Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoMethodError: private method `open' called for Gem::Package:Class An error occurred while installing rake (10.0.3), and Bundler cannot continue

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.

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.

Thank you!

like image 612
Madhu Avatar asked Mar 04 '13 16:03

Madhu


1 Answers

You should first update Rubygems:

gem update --system 

And then update Bundler:

gem install bundler 
like image 95
Guilherme Garnier Avatar answered Oct 06 '22 17:10

Guilherme Garnier