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
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:
export RAILS_ENV=production
in ~/.bash_profilebundle exec rake a_rake:task RAILS_ENV=production
rails console --env=production
etc...