0
0

More than 1 year has passed since last update.

Railsでbcryptエラー(cannot load such file — bcrypt)が出た時の対処法

Posted at

【エラー内容】
パスワード暗号化のため、Gemfileにコメントアウトされていたbcryptを導入したところ、以下のエラーが発生しました。

cannot load such file -- bcrypt

「bundle install」も実行しており、Userモデル内に「has_secure_password」を記述してもエラーが解消しませんでした。

【対処法】
Railsサーバーを一度停止し、再起動(rails s)する事でbcryptの内容が反映されました。
困ったらサーバーの再起動も試してみるべきですね。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0