Permalink
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 5704aa2 commit b08175825e954ff498eed3657f17f40f9f256868 @yalab yalab committed with spastorino Sep 30, 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
@@ -86,7 +86,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 b081758

Please sign in to comment.