b0nwgq
Last Updated: February 25, 2016
·
2.433K
· sheerun
Photo on 08.01.2013 at 04.15

Set template option in your database.yml for PostgreSQL

Specifically, use template0 as your default. That way Rails can smoothly force utf-8 encoding on db without complaining weirdly.

development: &defaults
  # (...)
  encoding: utf8
  template: template0

test:
  <<: *defaults
  # (...)

production:
  <<: *defaults
  # (...)