NoMethodError:Gem :: Package:Class调用了私有方法“ open”,安装rake(10.0.3)时发生错误,并且Bundler无法继续 [英] NoMethodError: private method `open' called for Gem::Package:Class An error occurred while installing rake (10.0.3), and Bundler cannot continue

查看:50
本文介绍了NoMethodError:Gem :: Package:Class调用了私有方法“ open”,安装rake(10.0.3)时发生错误,并且Bundler无法继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试处理从github同步的ruby on rails项目。即使rake-10.0.3安装成功,捆绑安装仍会失败。我是Rails的新手,不确定如何进行此操作。我在错误中进行了搜索,并尝试按照解决方案的建议安装不同版本的rake,但这没有帮助。

I am trying to work on a ruby on rails project I synced from github. Even though rake-10.0.3 gets installed successfully, 'bundle install' fails. I am new to rails and not sure how to proceed on this.I googled the error, and tried the installing different versions of rake as suggested by the solutions, but it did not help.

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

Here's what I am trying to do... Please help.


红宝石1.9.3p374(2013-01-15)[i386-mingw32]

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:

You should first update Rubygems:

gem update --system

然后更新Bundler:

And then update Bundler:

gem install bundler

这篇关于NoMethodError:Gem :: Package:Class调用了私有方法“ open”,安装rake(10.0.3)时发生错误,并且Bundler无法继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆