Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails NoMethodError:私有方法`打开';调用Gem::Package:Class安装rake(10.0.3)时出错,Bundler无法继续_Ruby On Rails_Rake_Bundler - Fatal编程技术网

Ruby on rails NoMethodError:私有方法`打开';调用Gem::Package:Class安装rake(10.0.3)时出错,Bundler无法继续

Ruby on rails NoMethodError:私有方法`打开';调用Gem::Package:Class安装rake(10.0.3)时出错,Bundler无法继续,ruby-on-rails,rake,bundler,Ruby On Rails,Rake,Bundler,我正在尝试一个从github同步的RubyonRails项目。即使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 ←[33m

我正在尝试一个从github同步的RubyonRails项目。即使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.


谢谢大家!

您应该首先更新Rubygems:

gem update --system
然后更新绑定器:

gem install bundler

试试这个:你在使用rvm还是ebenv?您好,谢谢您的回答,很抱歉延迟回复。在我卸载并重新安装ruby on rails之后,它得到了解决……为了后代:有了完全相同的问题,这个解决方案解决了它,这与大多数其他东西不同。你也确实需要第二步,即使你已经安装了相同版本的Bundler。