错误信息是:
MissingSourceFile in QuotesController#accept
no such file to load -- echo_sign
/Users/martin/.rbenv/versions/1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Users/martin/.rbenv/versions/1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/Users/martin/.rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/Users/martin/.rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/Users/martin/.rbenv/versions/1.8.7-p374/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/Users/martin/Desktop/[project_name]/app/controllers/quotes_controller.rb:182:in `accept'
This error occurred while loading the following files:
echo_sign
在我的控制器中我有:
require 'echo_sign'
我的项目使用的是ruby 1.8.7,但上面的gem需要1.9.3所以我更新了项目的ruby版本,首先安装新版本,然后在本地设置并运行rbenv rehash
rbenv local : 1.9.3-p448
rbenv global : 2.0.0-p0
ruby-v : ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
然而,应用程序似乎正在寻找宝石的错误版本文件夹,任何想法?