From 97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 18 Nov 2005 07:33:28 +0000 Subject: 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 --- railties/lib/commands/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/commands/console.rb b/railties/lib/commands/console.rb index 0aed60152c..6e61acb22f 100644 --- a/railties/lib/commands/console.rb +++ b/railties/lib/commands/console.rb @@ -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." -- cgit v1.2.3