LoginSignup
2
1

More than 3 years have passed since last update.

You don't have bcrypt installed in your application. と言われた

Posted at

railsチュートリアル第6章の最後の最後のrails testでエラってハマりまくったので備忘録。

環境

  • Rails 5.1.6
  • ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-darwin18]

問題発生

ユーザー作成も認証もできたし一区切り!と、ローカルでのrails testはok
しかしマージしてpushしたあと再びrails testしたところ怒られました

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

bcryptはinstallしてるしGemfileにもGemfile.lockにもあるのになんでだ・・・?
ググると同じようなエラーでハマったという方がいらっしゃって
rails server再起動とかuninstallしてから再インストールやってみたけど解決せず・・

なんとか解決

  • Gemfileのbcryptの部分をコメントアウトする
  • bundle installする
  • コメントアウト外す
  • 再びbundle install

たまたま見つけたこちらの方の手順でいけました:sob:
rails consoleでコマンド実行時のbcryptに関するエラーとその対処法

根本的な原因がまじでわかんないのでもちょい調べる。

2
1
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
2
1