From 202db51d4a9bf9c5f57ee9500c4655a3ead68bec Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 16 Jan 2011 07:47:41 +0900 Subject: [PATCH] "rails dbconsole t" must not load "production" but "test" --- railties/lib/rails/commands/dbconsole.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 14d245a..2729f06 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -113,5 +113,5 @@ end # Has to set the RAILS_ENV before config/application is required if ARGV.first && !ARGV.first.index("-") && env = ARGV.first - 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.3.5