Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a fix for the "Could not find *gem* in any of the sources" error that doesn't involve deleting Gemfile.lock?

I am trying to get my development environment setup on a new computer.

git clone -o heroku [email protected]:theirapp.git cd theirapp bundle Fetching gem metadata from https://rubygems.org/...... Fetching gem metadata from https://rubygems.org/.. Could not find jquery-rails-2.0.0 in any of the sources 

After googling this error, the response seems to be to delete Gemfile.lock, then running bundle again. This works, but then I have different versions of gems where I haven't specified a version in Gemfile. Is there a way to fix this error without deleting Gemfile.lock? I'm using Rails 3.2 and Ruby 1.9.3.

like image 233
ben Avatar asked Aug 09 '12 14:08

ben


People also ask

How do I change my Gemfile lock?

To automatically update the Gemfile. lock with your current version of Bundler, run bundle update --bundler . In general, it's a good idea to use the latest version of Bundler. That's why my Ruby on Mac script is meant to be run often to keep your system up to date with the latest versions of Bundler and Rubygems.

How is Gemfile lock created?

When you first call bundle install, it will create this Gemfile. lock and uses this file in all subsequent calls to bundle install, which ensures that you have all the dependencies installed and will skip dependency installation.


1 Answers

simply run

bundle --full-index 

that should do the trick

like image 132
Jamie-505 Avatar answered Oct 02 '22 08:10

Jamie-505