34

我正在尝试处理从 github 同步的 ruby​​ on rails 项目。即使 rake-10.0.3 安装成功,“捆绑安装”也会失败。我是 Rails 新手,不知道如何继续。我用谷歌搜索了错误,并尝试按照解决方案的建议安装不同版本的 rake,但没有帮助。

这就是我想要做的......请帮忙。

ruby 1.9.3p374 (2013-01-15) [i386-mingw32]

>rails s
←[31mCould not find kaminari-0.14.1 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m

>bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..

NoMethodError: private method `open' called for Gem::Package:Class
An error occurred while installing rake (10.0.3), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.3'` succeeds before bundling.

>gem install rake -v '10.0.3'
Successfully installed rake-10.0.3
Done installing documentation for rake (1 sec).
1 gem installed

>bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..

NoMethodError: private method `open' called for Gem::Package:Class
An error occurred while installing rake (10.0.3), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.3'` succeeds before bundling.

谢谢!

4

1 回答 1

89

您应该首先更新 Rubygems:

gem update --system

然后更新 Bundler:

gem install bundler
于 2013-03-05T13:45:19.823 回答