Running script/server leads to executing incorrect version of initalizer.rb

Hi All,

When I run ruby script/server, I get the error message:

lib/initializer.rb:328:in send': undefined methodsession=’ for
ActionController::Base:Class (NoMethodError)

Why did Ruby reference a rails-1.2.3 gem, rather than a 2.3.5 gem,
since that’s what I specified in environment.rb:
RAILS_GEM_VERSION = ‘2.3.5’ unless …
and I have no system environment variable named RAILS_GEM_VERSION.

The error message is probably appropriate for the 1.2.3 Rails version
because initializer.rb at line 328 is using meta-programming likely to
produce the the variable “session=”.

However I specified Rails gem version 2.3.5, so the 1.2.3 version of
initializer.rb should not have been invoked. And the 2.3.5 version of
initializer looks fine on this score.

Could I have done something to cause this error?


Sorry, duplicate posting. (I forgot the title I last posted under and
failed to flag it so I could find it when it received responses.)

On Feb 20, 8:02 am, RichardOnRails

Previous topic is “Script/server reference wrong version of

I apologize for the duplicate posting.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs