I have a Ruby script that does some special stuff and I want to pass it some parameters.
The revlet is hosted on my server.
In a regular application, I pass data to the Ruby script via shell, but this fails in revlet.
Shell scripts do not work. trying "shell ('pwd') in debug works, but when deployed, gives you nothing.
Even if I copy the file.. how can I access it? How can I send it data and get it back?
Accessing a Ruby File with a RevLet
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 23
- Joined: Tue Nov 11, 2008 5:52 pm
- Contact:
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
You'll have to ask for access to the Shell for your revlet.
In the Standalone Applications Settings window, go to the Web panel, switch Security from Auto-detect to Use these settings and tick the Shell checkbox.
When you build and test your revlet, it will ask permission for this revlet to access the Shell. Grant it, and your ruby script ought to work (on the condition that there is a Ruby interpeter, of course)
HTH,
Jan Schenkel.
In the Standalone Applications Settings window, go to the Web panel, switch Security from Auto-detect to Use these settings and tick the Shell checkbox.
When you build and test your revlet, it will ask permission for this revlet to access the Shell. Grant it, and your ruby script ought to work (on the condition that there is a Ruby interpeter, of course)
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- Posts: 23
- Joined: Tue Nov 11, 2008 5:52 pm
- Contact:
Close, but no cigar yet
the shell command looks here
which gives the local directory returns this:
/Users/hbeck/Library/Application Support/RunRev/revWebPlayer
This doesn't work for me, because the Ruby script is hosted on the server.
I need to send list of parameters to Ruby and get them back.
All the Ruby magic must happen on the server side.
Is there some way of doing this with revMedia?
Also, I have revStudio 3.5 and I don't understand the relationship between revMedia and my revStudio.
Why can't I make a Web Application with revStudio 3.5 directly?
Code: Select all
shell("pwd")
/Users/hbeck/Library/Application Support/RunRev/revWebPlayer
This doesn't work for me, because the Ruby script is hosted on the server.
I need to send list of parameters to Ruby and get them back.
All the Ruby magic must happen on the server side.
Is there some way of doing this with revMedia?
Also, I have revStudio 3.5 and I don't understand the relationship between revMedia and my revStudio.
Why can't I make a Web Application with revStudio 3.5 directly?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
If the Ruby script is running on the server, try using a GET or POST to the server as if it were a web app.
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com