我正在尝试将 Rails 应用程序投入生产。我已经将它上传到服务器,并且 ssh'ed 没有问题。当我尝试运行时:rake db:migrate RAILS_ENV=production
,我收到以下错误:
Could not find rake-10.0.4 in any of the sources
Run `bundle install` to install missing gems.
因此,我运行bundle install
并收到以下错误:
Gem::Exception: Cannot load gem at [/usr/local/lib/ruby/gems/1.9.1/cache/rake-10.0.4.gem] in /home/root/myapp
An error occurred while installing rake (10.0.4), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.4'` succeeds before bundling.
从这里,我跑了gem install rake -v '10.0.4' --no-rdoc --no-ri
,它成功了:
然而,仍然bundle install
失败并出现同样的错误。我能做些什么来解决这个问题?