Ruby on rails 为什么rake调用抛出一个';未定义的方法'cache';对于Gem:Module';错误?

Ruby on rails 为什么rake调用抛出一个';未定义的方法'cache';对于Gem:Module';错误?,ruby-on-rails,ruby,rubygems,gem,rake,Ruby On Rails,Ruby,Rubygems,Gem,Rake,我正在尝试设置rails应用程序,但遇到以下错误。跑步时 rake db:migrate --trace un-defining :chars method on String for ruby 1.8.7 compatibility rake aborted! undefined method `cache' for Gem:Module /usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/site_ruby/1.8/rubygems/core_

我正在尝试设置rails应用程序,但遇到以下错误。跑步时

rake db:migrate --trace


un-defining :chars method on String for ruby 1.8.7 
compatibility
rake aborted!
undefined method `cache' for Gem:Module
/usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55:in `gem_original_require'
/usr/local/rvm/rubies/ruby-1.8.7-p371/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:89:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:72:in `run'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/usr/local/rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.0.3/bin/rake:33
/usr/local/rvm/gems/ruby-1.8.7-p371@mapwalk/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-1.8.7-p371@mapwalk/bin/rake:23
/usr/local/rvm/gems/ruby-1.8.7-p371@mapwalk/bin/ruby_noexec_wrapper:14
ruby版本:1.8.7 rails版本:1.2.3 rubygems:1.4.2

宝石清单:

*** LOCAL GEMS ***

actionmailer (1.3.3)
actionpack (1.13.3)
actionwebservice (1.2.3)
activerecord (1.15.3)
activesupport (1.4.2)
bundler (1.2.3)
gem-wrappers (1.2.4)
rails (1.2.3)
rake (10.0.3, 0.9.2, 0.8.7)
rubygems-bundler (1.1.0)
rubygems-update (1.4.2)
rvm (1.11.3.5)

提前感谢..

您可以添加您尝试运行的迁移文件吗?@JKen13579在他们的应用程序中有73个迁移文件..我如何判断是哪个文件导致了问题。请显示
Gemfile
。如果你have@Monk_Code请查看
gem列表
结果。对不起,我应该更清楚一些。我的意思是,更好的做法是运行
rakedb:schema:load
,而不是从头开始运行一系列迁移。事实上,这个人也犯了和你一样的错误,并通过降级他的rubygem版本来规避。也许这对你有用?