Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix em_mysql2 error in rake db:create

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 04a8601d5e6e8ad9bcc49c8a31b9339cf2b166bc 1 parent d0e067f
@saarons saarons authored josevalim committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/railties/databases.rake
View
2  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))
Please sign in to comment.
Something went wrong with that request. Please try again.