相关疑难解决方法(0)

PG ::错误:错误:新编码(UTF8)不兼容

postgresql-9.2.4从源代码安装,现在在执行时使用rails app:

rake db:create 命令我得到:

$ bin/rake db:create RAILS_ENV="test"
PG::Error: ERROR:  new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "verticals_test" ENCODING = 'unicode'
/home/vagrant/my-project/.gems/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `exec
....
bin/rake:16:in `load'
bin/rake:16:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"my_db", "host"=>"localhost", "pool"=>5, "username"=>"my_user", "password"=>"my_password"}
Run Code Online (Sandbox Code Playgroud)

任何的想法?

ruby postgresql ruby-on-rails

77
推荐指数
5
解决办法
4万
查看次数

标签 统计

postgresql ×1

ruby ×1

ruby-on-rails ×1