Skip to content

Commit

Permalink
Fix em_mysql2 error in rake db:create
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
saarons authored and josevalim committed Aug 27, 2010
1 parent dbbf198 commit ba03dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/railties/databases.rake
Expand Up @@ -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))
Expand Down

0 comments on commit ba03dd4

Please sign in to comment.