Standalone Ruby application error messages and fixes

RuntimeError: You’re depending on RAILS_ENV for setting your environment. Please use ENV[‘environment’] for non-rails environment setting: ‘rake foo:bar environment=test’

Fix: in your gem definition file, add:

1
2
3
4
5
6
module XXXX
class << self
ENV['environment'] = 'production'
end
end

You attempted to set the property ‘XXXX’ to a scalar value. However, this property is declared as being multivalued.

Fix: pass an array to the method

Share