Hello, I have a program built in InstantRails 1.6 on Windows Server 2003. I have a script, located in the script folder. I also have a windows version of Cron, which points to that script. However, it doesn''t seem to execute properly. If I call it from a controller in my app, it works fine using `script/myscript.rb` however, when I simply double-click it in windows explorer, a command window pops up briefly (less than a second) and closes, not executing anything. How am I to run my script from anywhere, not just rails? Any and all help is appreciated! Thanks, - Jeff Miller -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
FYI, on a test script I created (which just creates a txt file and puts in some lines) I noticed that it will work if I don''t load up the environment. However, when I put require File.expand_path(File.dirname(__FILE__) + "/../config/environment") at the top, it exits the program as soon as it starts... I need to use this so I can access my models from that script, so I am not quite sure how to go about this... Any advice? Thanks, - Jeff Miller -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
A coworker of mine helped me figure out that I am having this problem because Ruby is not installed on the system, as it is only available via Ruby on Rails (InstantRails 1.6). Is there a way I can "expand" this so that I can use it outside of Rails? Thanks, - Jeff -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---