mirror of
https://github.com/github/rails.git
synced 2026-01-27 23:38:11 -05:00
script/console uses RAILS_ENV environment variable if present. Closes #2932.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* script/console uses RAILS_ENV environment variable if present. #2932 [Blair Zajac <blair@orcaware.com>
|
||||
|
||||
* Windows: eliminate the socket option in database.yml. #2924 [Wayne Vucenic <waynev@gmail.com>]
|
||||
|
||||
* Eliminate nil from newly generated logfiles. #2927 [Blair Zajac <blair@orcaware.com>]
|
||||
|
||||
@@ -12,7 +12,7 @@ libs = " -r irb/completion"
|
||||
libs << " -r #{RAILS_ROOT}/config/environment"
|
||||
libs << " -r console_sandbox" if options[:sandbox]
|
||||
|
||||
ENV['RAILS_ENV'] = ARGV.first || 'development'
|
||||
ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'development'
|
||||
if options[:sandbox]
|
||||
puts "Loading #{ENV['RAILS_ENV']} environment in sandbox."
|
||||
puts "Any modifications you make will be rolled back on exit."
|
||||
|
||||
Reference in New Issue
Block a user