1

rake db:migrate端末でコマンドを実行しようとしていますが、エラーが発生します。ほんの数分前に機能していました。エラーは次のとおりです。

rake aborted!
no such file to load -- activerecord

エラーの完全なトレース:

/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:inrequire' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in block in require' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:inload_dependency' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in require' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/has_one_autocreate-1.0.0/lib/has_one_autocreate.rb:2:in' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in require' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:inblock (2 levels) in require' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in each' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:inblock in require' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in each' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:inrequire' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.4/lib/bundler.rb:119:in require' 
/Users/amritayalur/rails_projects/mobilecapdb/config/application.rb:7:in' 
/Users/amritayalur/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' 
/Users/amritayalur/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' 
/Users/amritayalur/rails_projects/mobilecapdb/Rakefile:5:in <top (required)>' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:inload' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in load_rakefile' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:501:inraw_load_rakefile' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:82:in block in load_rakefile' 
/Users/amritayalur/.rvm/gems/ruby1.9.2p318/gems/rake0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:81:in load_rakefile' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:65:inblock in run' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/lib/rake/application.rb:63:inrun' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>' 
/Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/bin/rake:23:inload' /Users/amritayalur/.rvm/gems/ruby-1.9.2-p318/bin/rake:23:in <main>'

これを修正するにはどうすればよいですか?

4

1 に答える 1

0

指定した Gem が正しくインストールされていない可能性があります。これを試して:

bundle install
rake db:migrate
于 2012-06-17T20:46:05.203 に答える