我正在努力研究我从github同步的rails项目上的ruby。即使rake-10.0.3安装成功,“bundle install”也会失败。我是rails的新手,不知道如何继续这个。我用Google搜索错误,并尝试按照解决方案的建议安装不同版本的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.
>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.
谢谢!
答案 0 :(得分:89)
您应首先更新Rubygems:
gem update --system
然后更新Bundler:
gem install bundler