0

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. 
pigate
  • 351
  • 1
  • 7
  • 16
  • Try deleting Gemfile.lock and then running `bundle install` again. – pdoherty926 Dec 30 '13 at 20:40
  • Thank you for your suggestion, which has helped me fix the problem. I removed Gemfile.lock, then commented out the bcrypt-ruby line from Gemfile. Then, I ran [bundle install] to regenerate the Gemlock file, reinserted the bcrypt-ruby line in the Gemfile, and ran [bundle install] again. This time bcrypt was successfully added. Thank you again! – pigate Dec 30 '13 at 21:25

1 Answers1

0

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

pdoherty926
  • 9,895
  • 4
  • 37
  • 68