Pit said:
FWIW, I never had problems calling Ruby scripts with command line
args, and I just enter the script name without "ruby". Currently I'm
using the OCI on Windows 2000...
I think the steps should be something like:
1. Add Ruby Interpreter path to your path to make sure that you can run
Ruby from anywhere
2. In Explorer, go to a folder that has a Ruby script ending with an
extension of .rb
3. Press shift and right click on the .rb file there
4. In the context menu, it should give an option called 'Open with' - if
that has the Ruby interpreter in it, click on it. If that works, great!
5. Alternatively, click on 'Choose Program' - navigate to your ruby
install and select ruby.exe
6. Click on 'Always use the selected program' - say OK, etc.
7. Go to a command prompt and try to run your ruby script without ruby
in the name and with the parameters
command>myscript.rb param1
It should work.
Note that the associations need to be set up in the GUI and the script
must be run from the command line with the parameters. It has worked
like that for me for months. Do post if there's a problem.
I think using Rubyscript2exe for this is a bit of a troublesome way -
since you may want to change your script, etc. and having to repackage
it all the time just to try something simple is a pain!
Cheers,
Mohit.
11/25/2008 | 1:18 PM.