Dear guys,
I have instainsRails in my PC. i have written a ruby programm. now i want to compile it by ruby.exe. suppose its directory is c:/instantsRails/ruby/bin/ruby.exe and my file is in c:/myfile.ruby. so hoe can i create a bat file which can run ruby and compile my file?
Amin
when you installed ruby, it should have modified your PATH to include where ruby.exe is located. if not, you can manually add the path to your environment. Next time you run your ruby script, you can just change directory to c:\ and execute the script from there.eg c:\> ruby.exe myfile.ruby. this should run, even though ruby.exe is not in C:\.
And so, your batch file should look something like
c:
ruby myfile.ruby