You have to specify the environment with -e env_name
or RAILS_ENV=env_name
if you want to run a script on the server.
at Rails 2 it's script/runner
bundle exec script/runner -e env_name path/to/script.rb argument1 argument2 ...
at Rails 3 it's rails runner
RAILS_ENV=env_name bundle exec rails runner path/to/script.rb argument1 argument2 ...
Posted by Martin Straub to makandra dev (2011-11-14 11:41)