Ubuntu, Bundle Install/Update could not find gem bcrpyt-ruby ... in the gems available

1.3k views Asked by At

Solution below in comment and in post:

OS: Ubuntu 12.0.4

Problem: bcrypt-ruby, bundle install/update

Working on RoR, following Michael Hartl's Tutorial. Ch. 6.3.1, Encrypted Password

I've included this line in my gem-file:

gem 'bcrypt-ruby', '~>3.1.2'

I can install bcrypt from the console. My system lists it as below:

myapp1$ gem list bcrypt-ruby

*** LOCAL GEMS ***

bcrypt-ruby (3.1.2)

But when running bundle install, bcrypt cannot be found.

myapp1$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'bcrpyt-ruby (~> 3.1.2) ruby' in the gems available on this machine.

I've seen the previous questions on bcrypt and bundle-install, and attempted their solutions, to no avail.

Can anyone point me in a direction or offer a solution?

Many thanks!

Solution in this case

Removed Gemfile.lock, then comment out/delete the bcrypt-ruby line from Gemfile. 
Then, run [bundle install] to regenerate the Gemlock file, 
reinsert the bcrypt-ruby line in the Gemfile, and run [bundle install] again. 
In this case, bcrypt is successfully added. 
1

There are 1 answers

0
pdoherty926 On BEST ANSWER

Try deleting Gemfile.lock and then running bundle install again.