I am a Rails beginner. When i am trying to use gem bcrypt, i see an error on my screen "cannot load such file -- bcrypt" control stuck at 'has_secure_password' line of Model.
Server logs
LoadError (cannot load such file -- bcrypt):
app/models/user.rb:3:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
app/controllers/users_controller.rb:4:in `new'
Started GET "/signup" for 127.0.0.1 at 2018-02-18 15:03:08 +0530
Processing by UsersController#new as HTML
You don't have bcrypt installed in your application. Please add it to your Gemfile and run bundle install
Completed 500 Internal Server Error in 22ms (ActiveRecord: 0.0ms)
LoadError (cannot load such file -- bcrypt):
app/models/user.rb:3:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
app/controllers/users_controller.rb:4:in `new'
Gem file
#gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
gem 'bcrypt', '~> 3.1.7'
I've used both the above gems executing one at time. Even after checking out many blogs and sites, i could not find a solution.
I could bring up my rails server with no issues, but could not open my View in the browser.
Can someone help.