Henrik N
2009-Mar-22 11:14 UTC
Upgrading 2.2 to 2.3: console broken, "uninitialized constant Module::ActiveSupport"
Upgrading a Rails app from 2.2 to 2.3.2 (via 2.3.0). Got things working in the browser, but script/console seems messed up in both 2.3.0 and 2.3.2: $ script/console Loading development environment (Rails 2.3.2) /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:56:in `env'':NameError: uninitialized constant Module::ActiveSupport /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/ testing/deprecation.rb:49:NoMethodError: undefined method `alias_method_chain'' for Test::Unit::Error:Class /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/console_with_helpers.rb: 5:NameError: uninitialized constant ApplicationController>> Rails.version=> "2.3.2">> ApplicationControllerNameError: uninitialized constant ApplicationController Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Henrik N
2009-Mar-22 12:04 UTC
Re: Upgrading 2.2 to 2.3: console broken, "uninitialized constant Module::ActiveSupport"
On Mar 22, 12:14 pm, Henrik N <hen...-//VPbvzLDw4@public.gmane.org> wrote:> Upgrading a Rails app from 2.2 to 2.3.2 (via 2.3.0). Got things > working in the browser, but script/console seems messed up in both > 2.3.0 and 2.3.2: > > $ script/console > Loading development environment (Rails 2.3.2) > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/initializer.rb:56:in > `env'':NameError: uninitialized constant Module::ActiveSupport > /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/ > testing/deprecation.rb:49:NoMethodError: undefined method > `alias_method_chain'' for Test::Unit::Error:Class > /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/console_with_helpers.rb: > 5:NameError: uninitialized constant ApplicationController>> Rails.version > => "2.3.2" > >> ApplicationController > > NameError: uninitialized constant ApplicationController > > Any ideas?Poked around more. Turns out the culprit was using "10.years" inside environment (setting config.action_controller.session[:expire_after]). I can reproduce the issue by generating a new app and adding ''puts 10.years'' to environment.rb (e.g. after config.time_zone). One fix is to not use it there. Another is to explicitly require ''active_support''. Tried with Rails 2.2.2 and saw similar issues; in upgrading to 2.3, :session_expires (which takes a Time) changed to :expire_after (which takes an interval), so I had not noticed it before. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- uninitialized constant ActionVie
- uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)
- uninitialized constant ActiveSupport::Cache (NameError)
- validators.rb breaks after update from Rails 2.2.2 to 2.3.2
- script/console: "no such file to load -- application.rb (MissingSourceFile)"