Greg Hauptmann
2008-May-05 01:43 UTC
"uninitialized constant ActiveSupport" when running "rake db:migrate:reset" after including my own default date format in environment.rb
Hi, When I include this line in my environment.rb file my Rails app works as expected, HOWEVER using "rake:db:reset" then does not work after this??? "ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default] "%d/%m/%Y" The rake exception that gets thrown is below. Any ideas re how to get rake working as obviously I want to be able to keep my own default date format? rake aborted! uninitialized constant ActiveSupport /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2237:in `const_missing'' /Volumes/USBOPEN/myApp/config/environment.rb:65 /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:47:in `run'' /Volumes/USBOPEN/myApp/config/environment.rb:16 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/misc.rake:3 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 /opt/local/bin/rake:19:in `load'' /opt/local/bin/rake:19 ** Invoke db:migrate:reset (first_time) ** Invoke db:drop (first_time) ** Invoke environment (first_time) ** Execute environment --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Matthew Rudy Jacobs
2008-May-05 01:51 UTC
Re: "uninitialized constant ActiveSupport" when running "rak
Greg Hauptmann wrote:> "ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS[:default] > > "%d/%m/%Y"> rake aborted! > uninitialized constant ActiveSupport > /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2237:in > `const_missing'' > /Volumes/USBOPEN/myApp/config/environment.rb:65looks like you''ve put the ActiveSupport line inside the Rails::Initializer.run block. you need to put it at the end of your environment.rb file, else ActiveSupport hasn''t yet been loaded... hence the exception it raises. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---