diff options
author | Sam Aarons <samaarons@gmail.com> | 2010-08-26 00:27:58 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-27 14:57:16 -0300 |
commit | 04a8601d5e6e8ad9bcc49c8a31b9339cf2b166bc (patch) | |
tree | da668043353349785113ef1f2827e1b4c781ad2c /activerecord/lib/active_record/railties | |
parent | d0e067f61b441e04c0f117e28aae07f6b3ceaa79 (diff) | |
download | rails-04a8601d5e6e8ad9bcc49c8a31b9339cf2b166bc.tar.gz rails-04a8601d5e6e8ad9bcc49c8a31b9339cf2b166bc.tar.bz2 rails-04a8601d5e6e8ad9bcc49c8a31b9339cf2b166bc.zip |
Fix em_mysql2 error in rake db:create
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index b46c4b59a2..b1aad0d496 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -61,7 +61,7 @@ namespace :db do @charset = ENV['CHARSET'] || 'utf8' @collation = ENV['COLLATION'] || 'utf8_unicode_ci' creation_options = {:charset => (config['charset'] || @charset), :collation => (config['collation'] || @collation)} - error_class = config['adapter'] == 'mysql2' ? Mysql2::Error : Mysql::Error + error_class = config['adapter'] =~ /mysql2/ ? Mysql2::Error : Mysql::Error access_denied_error = 1045 begin ActiveRecord::Base.establish_connection(config.merge('database' => nil)) |