diff options
author | Sam Granieri <sam@samgranieri.com> | 2010-01-13 18:38:22 -0600 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-16 20:55:22 +0530 |
commit | 488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4 (patch) | |
tree | 287df81a2283fc84a55394be0683d7282abb5852 | |
parent | 92f49b5f1ebf42514c58e1fda87c0b8a1b33d08f (diff) | |
download | rails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.tar.gz rails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.tar.bz2 rails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.zip |
Make script/dbconsole work again [#3690 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index b836a17a49..593e2d8ee3 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -34,8 +34,8 @@ module Rails abort opt.to_s unless (0..1).include?(ARGV.size) end - unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[env] - abort "No database is configured for the environment '#{env}'" + unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[Rails.env] + abort "No database is configured for the environment '#{Rails.env}'" end |