Ideally, you need to set the environment variable to .bashrc, for example
export RAILS_ENV=staging
because it railscompletely depends on the environment variable. But as you said
RAILS_ENV ~/.bashrc ~/.bash_profile . , ~/.bashrc ~/.bash_profile?
, . config/boot.rb
ENV["RACK_ENV"] = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "staging"
.
- Rails 4
- Console
- dbconsole
- , โโ
bashrc zshrc ..