Skip to content
Browse files

Fix 'rake db:create' is ignore encoding when using postgres [#5717 st…

…ate:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information...
1 parent 33733d5 commit 91deff08c940f16ed149e7628694faff0393fe0a @yalab yalab committed with spastorino Oct 1, 2010
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
@@ -108,7 +108,7 @@ namespace :db do
end
end
when 'postgresql'
- @encoding = config[:encoding] || ENV['CHARSET'] || 'utf8'
+ @encoding = config['encoding'] || ENV['CHARSET'] || 'utf8'
begin
ActiveRecord::Base.establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
ActiveRecord::Base.connection.create_database(config['database'], config.merge('encoding' => @encoding))

0 comments on commit 91deff0

Please sign in to comment.
Something went wrong with that request. Please try again.