diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-15 21:54:46 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-15 21:54:46 +0100 |
commit | 879493c35fd8d9e12e5cf3e56cd67ff07c3345c5 (patch) | |
tree | 9615859e1d9a52f71da444b0b7359817bb6acc50 /railties/lib/commands | |
parent | d6ecce66f4e125531875006eea8022b73fe135b5 (diff) | |
parent | fc02eabf296d6edb74a95174c7322293a54c9492 (diff) | |
download | rails-879493c35fd8d9e12e5cf3e56cd67ff07c3345c5.tar.gz rails-879493c35fd8d9e12e5cf3e56cd67ff07c3345c5.tar.bz2 rails-879493c35fd8d9e12e5cf3e56cd67ff07c3345c5.zip |
Merge commit 'mainstream/master'
Conflicts:
actionmailer/lib/action_mailer/base.rb
Diffstat (limited to 'railties/lib/commands')
-rw-r--r-- | railties/lib/commands/dbconsole.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/commands/dbconsole.rb b/railties/lib/commands/dbconsole.rb index 28c3a3e41f..3e5010c688 100644 --- a/railties/lib/commands/dbconsole.rb +++ b/railties/lib/commands/dbconsole.rb @@ -1,3 +1,4 @@ +require 'erb' require 'yaml' require 'optparse' @@ -8,7 +9,7 @@ OptionParser.new do |opt| end env = ARGV.first || ENV['RAILS_ENV'] || 'development' -unless config = YAML.load_file(RAILS_ROOT + "/config/database.yml")[env] +unless config = YAML::load(ERB.new(IO.read(RAILS_ROOT + "/config/database.yml")).result)[env] abort "No database is configured for the environment '#{env}'" end |