I have an older application running Ruby on Rails 2.2, and I'm having trouble getting a gem to work because it can't find the current environment with Rails.env:
$ script/console
>> Rails.env
NoMethodError: undefined method `env' for Rails:Module
from (irb):1
The gem is set up to use Rails.env when Rails is defined, and RAILS_ENV when it's not. But I seem to have a Rails object without an env method (even though I read that method was added in Rails 2). Any idea what's going on?
puts Rails.methods.sort.env.