LoginSignup
2
2

More than 5 years have passed since last update.

Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile (LoadError)というエラーが出たときの対処法

Posted at

Introduction

rails db:create した際に発生した下記のエラー対処法。
あまりにもしょうもないミスをしてしまったため、自戒を込めて投稿!!


Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile (LoadError)

参考資料(今回は使ってません)

同様のメッセージで苦戦し乗り越えた方々。
今回は使用しませんでしたが、同じようなエラーでハマっている場合はご参考ください。

私の対処法

上記のURLからいろいろ試してみて上手く行かなかったため、ダメ元でGemfileの中身を確認したら listen がないこと確認。
下記のように Gemfile を編集し、 bundle install して終わり!!


# 省略

group :development do

  gem 'listen'

end

ちなみにエラー文をよく読むと。。。書いてありました


LoadError: cannot load such file -- listen

Conclusion

エラー文はよく読みましょう!!

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