diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 07:33:28 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-18 07:33:28 +0000 |
commit | 97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb (patch) | |
tree | 49f51bf1f2772b568e4e302c5d24281e4ac04c7c /railties | |
parent | ae76e227310389170775d0d3cef963daa793e29f (diff) | |
download | rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.tar.gz rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.tar.bz2 rails-97d5f4acdfb986c5dc26f7c48518ef8a7d26f8bb.zip |
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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/commands/console.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 39593f2f6c..b15d7b3883 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -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>] 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." |