Rails: Production Rails console won't start

后端 未结 4 673
挽巷
挽巷 2021-02-04 16:34

Everything works fine on my OS X development laptop.

Deploy the app to production and it runs and displays data as expected.

However, when I try to run the Rails

相关标签:
4条回答
  • 2021-02-04 16:41

    Solved it.

    All I needed to do was...

    $ RAILS_ENV=production bundle exec rails console
    
    0 讨论(0)
  • 2021-02-04 16:49

    You can also solve this by appending the --environment=production argument to the rails c or rails console command

    rails c --environment=production
    

    That's all.

    I hope this helps

    0 讨论(0)
  • 2021-02-04 16:50

    Another way to do this:

    ./script/rails console production

    0 讨论(0)
  • 2021-02-04 17:02

    I solved with run:

     RAILS_ENV=production bundle exec rails c
    

    more details on link

    0 讨论(0)
提交回复
热议问题