2010-05-26 113 views
1

我以前曾經使用rails 2.3.2,然後決定升級到2.3.4版本。無法在rails上生成遷移2.3.4

今天我試圖產生遷移(我能做到這一點罰款與2.3.2版本),我得到了以下錯誤消息:

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/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 

我不知道爲什麼會這樣。在2.3.2中一切正常,現在不行。

+0

我一直有使用Netbeans從一個版本的rails遷移出現問題。順便說一句,你在Ruby或Jruby上工作嗎? – Snehal 2010-05-26 21:03:56

+0

內置JRuby 1.4.0 – 2010-05-27 12:50:09

回答

0

嗯,我可以通過將以下行(寫在下面)一旦Rails::Initializer.run do |config|塊結束時解決這個問題(這是在此區塊之前)。

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:standard => "%B %d, %Y") 
1

Activesupport gem未安裝在您的機器上。嘗試運行此命令:

gem install activesupport 

櫃面它不工作,試試這個

gem update --system 
gem update --source http://gems.rubyonrails.org 
+0

Snehal:這兩個選項都沒有奏效。我收到了同樣的錯誤。我會給你一個投票的嘗試。 – 2010-05-26 20:07:14