BrainOverfl0w
BrainOverfl0w

Reputation: 277

Gem Installed but bundler doesn't get it

I installed mocha using gem install mocha and it did install successfully. There are no version requirements of a specific version in my GEMFILE.

I still get the error :

Could not find mocha-0.10.3 in any of the sources

Anyone knows why ?

Upvotes: 0

Views: 615

Answers (2)

Abe Voelker
Abe Voelker

Reputation: 31564

Looks like that version of mocha was yanked from RubyGems, so you will need a newer version. If you're not hardlocked to a specific version in your Gemfile, then try a bundle update mocha to update your Gemfile.lock. Otherwise, make sure you're using the spermy operator to specify the version in your Gemfile:

gem "mocha", "~> 0.10.5"

Upvotes: 0

Jakub Arnold
Jakub Arnold

Reputation: 87210

To install gems from rubygems.org, you need to set the source :rubygems in the Gemfile, to make it look something like

source :rubygems
gem "mocha"

the problem might also be that your Gemfile.lock requires an older version due to some dependencies, than the one you've installed via gem install mocha, assuming that's what you did.

Showing contents of your Gemfile might help solve this easier though.

Upvotes: 1

Related Questions