From d2c4a93c6966cb06d6029f9f4dbe5f71a52a02db Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 9 Jan 2010 09:52:16 -0800 Subject: Have to remove the environment name from ARGV or IRB will freak out --- railties/lib/rails/commands/console.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 37eb6d40ea..d154808029 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -25,7 +25,7 @@ module Rails opt.parse!(ARGV) end - if env = ARGV.first + if env = ARGV.pop ENV['RAILS_ENV'] = ENVIRONMENTS.find { |e| e.index(env) } || env end -- cgit v1.2.3