From 63382475da0cdda205a46b05308f0657ac1b6be0 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 2 Sep 2010 12:05:34 +0900 Subject: [PATCH] "rails console t" must not load "production" but "test" --- railties/lib/rails/commands/console.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 834a120..de2f190 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -48,5 +48,5 @@ end # Has to set the RAILS_ENV before config/application is required if ARGV.first && !ARGV.first.index("-") && env = ARGV.pop # has to pop the env ARGV so IRB doesn't freak - ENV['RAILS_ENV'] = %w(production development test).find { |e| e.index(env) } || env + ENV['RAILS_ENV'] = %w(production development test).detect {|e| e =~ /^#{env}/} || env end -- 1.7.2.2