This question already has an answer here:
- can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1. Make sure all dependencies are added to Gemfile 9 answers
I'm trying to install bcrypt to handle passwords.
I ran gem install bcrypt-ruby
and got:
....Successfully installed bcrypt-ruby-3.1.2
I added gem "bcrypt-ruby", "~> 3.1.2"
and ran bundle install
, and restarted the server which ran the program but I got the error:
get Gem::LoadError in UsersController#new
can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.2. Make sure all dependencies are added to Gemfile.
format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
**has_secure_password** <---Error
validates :password, length: { minimum: 6 }
end