Read more

Run a script on the server

Deleted user #6
November 14, 2011Software engineer

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.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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 to makandra dev (2011-11-14 12:41)