Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bcrypt-ruby - You don't have bcrypt-ruby installed in your application

I'm beginner in Ruby on Rails and trying to learn from http://ruby.railstutorial.org/ I'm creating sample_app and got stuck at chapter 6.

My Ruby version: ruby 2.0.0p195 (2013-05-14) [i386-mingw32]

My Rails version: Rails 4.0.0

I have following line in my GemFile:

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

If I type gem list bcrypt-ruby , it shows bcrypt-ruby (3.0.1) . But if I try to create user, I get error saying

You don't have bcrypt-ruby installed in your application. Please add it to your Gemfile and run bundle install

I searched a lot on rails website, bcrypt website & even stackoverflow. But, nothing worked. Please help.

like image 869
Nilesh Avatar asked Nov 26 '25 06:11

Nilesh


2 Answers

I've faced this issue recently (as have many others). As per ladyruby723 posted here, use gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt' in your gemfile file.

like image 148
weezilla Avatar answered Nov 28 '25 21:11

weezilla


I solved this the same problem by the following line:

gem 'bcrypt-ruby', '~> 3.1.2'
like image 40
Jacky Avatar answered Nov 28 '25 22:11

Jacky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!