Running a script in InstantRails

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

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