LoadError: Could not load the 'listen' gem (Rails 5)

前端 未结 10 582
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 05:36

I\'ve got an API mode Rails 5 app that won\'t let me run rake routes or rails s. The error I get is:

$ rake routes
rake aborted!
Lo         


        
10条回答
  •  情歌与酒
    2020-12-14 06:12

    If you are on rails 5 and you are using the default config/environments/development.rb file it will have this line of code in there.

    config.file_watcher = ActiveSupport::EventedFileUpdateChecker
    

    This requires the gem listen. This threw me for a bit as I was doing a rails 4 upgrades to a rails 5

    edit: Forgot to mention that if you comment that line of code out it will not need the listen gem anymore.

提交回复
热议问题