Errors when introducing bcrypt

Error when introducing bcrypt

This is a summary of solutions to small errors that occurred when introducing gems and bcrypt for password encryption.

Part 1 An error occurred while installing bcrypt, and Bundler cannot continue.

Gemfile


gem 'bcrypt'

And when I ran bundle install, 5A9EC28E-C920-4220-8E26-235FCFFCA819_4_5005_c.jpeg An error occurred while installing bcrypt (3.1.13), and Bundler cannot continue. Error occurs. Next, it is written in the error message, gem install bcrypt -v'3.1.13' When I execute, Permission denied occurs this time

Execute the following code to see if Permission is the turn of sudo

$ sudo gem install bcrypt

Now the error on bundle install disappears and bcrypt is added!

Part 2 cannot load such file --bcrypt

I successfully overcame error 1 and restarted the localhost browser, but this error

Speaking of which, I remembered that there was a long time ago like this, and re-executed rails s.

Then I passed! !!

This time there were a lot of small errors when introducing bcrypt ~

Recommended Posts

Errors when introducing bcrypt
Error when introducing SNS authentication
To avoid errors when starting miChecker
Thinking when introducing a new library
How to resolve errors when installing Rails 5.1.3