Rails console default environment

前端 未结 2 559
醉酒成梦
醉酒成梦 2020-12-31 06:06

On my development machine:

$ bundle exec rails console
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > Rails.env
 => \"development\"
         


        
2条回答
  •  粉色の甜心
    2020-12-31 06:27

    The rails executable can't know which environment should run on which machine.

    you can put export RAILS_ENV=production in your ~/.bashrc or ~/.bash_profile file of the user you want to start the console with.

提交回复
热议问题