method
environment
v1.1.6 -
Show latest stable
- Class:
Rails::Configuration
environment()public
Return the currently selected environment. By default, it returns the value of the RAILS_ENV constant.
1Note
Custom environment constants
Custom environment level constants can be passed in to your rails application (server, console, whatever) like this):
bash, tcsh, whatever shell
GAMEMODE=pregame script/server
Within rails this constant can be accessed by
ENV['GAMEMODE'] => "pregame"
ENV['DOES-NOT-EXIST'] => nil