Category: bash

Ruby on Rails: How can I specify runner script environment

I am using a shell script to run some runner scripts in my Ruby on Rails app. I need to run it on the production database, but the following: #!/bin/bash /usr/bin/ruby RAILS_ENV=production ../script/runner ../lib/tasks.rb gives an error: /usr/bin/ruby: No such file or directory — RAILS_ENV=production (LoadError) I have tried to force it in config/environment.rb ENV[‘RAILS_ENV’] […]