I used to work with rails 2.3.2 before and then I decided to upgrade to version 2.3.4.
Today I tried to generate a migration(I could do this fine with version 2.3.2) and I got the following error message:
C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:812:in `const_missing': uninitialized constant ActiveSupport (NameError)
from D:/Proyectos/Cursometro/www/config/environment.rb:33
from C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:111:in `run'
from D:/Proyectos/Cursometro/www/config/environment.rb:15
from D:/Proyectos/Cursometro/www/config/environment.rb:31:in `require'
from C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/generate.rb:1
from C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/开发者_JAVA百科gems/rails-2.3.4/lib/commands/generate.rb:31:in `require'
from C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script\generate:3
I don't know why this is happening. Everything worked fine in 2.3.2 and now it doesn't.
Activesupport gem is not installed on your machine. Try running this command:
gem install activesupport
Incase it doesn't work, try this
gem update --system
gem update --source http://gems.rubyonrails.org
Well I could solve this by placing the following line(written below) once the Rails::Initializer.run do |config|
block ends(it was inside this block before).
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:standard => "%B %d, %Y")
精彩评论