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

前端 未结 10 490
伪装坚强ぢ
伪装坚强ぢ 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:18

    I'm having the same problem by running rails c.

    By reading this other Stack Overflow post I did realize that it is normal that both bundle exec rake command or rails console are running in a default production environment.

    I figured I will solve the issue either by:

    1. adding export RAILS_ENV=production in ~/.bash_profile
    2. explicitly writing the environment in which I want the command to execute like bundle exec rake a_rake:task RAILS_ENV=production rails console --env=production etc...

提交回复
热议问题