PG::Error: ERROR: new encoding (UTF8) is incompatible

后端 未结 6 1254
迷失自我
迷失自我 2021-01-29 19:16

I have installed postgresql-9.2.4 from the source, now in rails app when I execute:

rake db:create command I get:

$ bin/rake db         


        
6条回答
  •  长情又很酷
    2021-01-29 19:42

    Make sure you have the correct setup in your database.yml file. You should use template0, as the error suggests:

    test:
      adapter: postgresql
      encoding: unicode
      database: your_db_name
      template: template0
      host: localhost
      ...
    

提交回复
热议问题