2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ruby on Rails(bundle exec rake test => error)

Last updated at Posted at 2016-09-27

template0のencodingを変更することで解決

mike@rbci:~$ psql -U postgres 
psql (9.0.3) 
Type "help" for help. 
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0'; 
UPDATE 1 
postgres=# \c template0 
You are now connected to database "template0". 
template0=# update pg_database set datistemplate = FALSE where datname = 'template1'; 
UPDATE 1 
template0=# drop database template1; 
DROP DATABASE 
template0=# create database template1 with template = template0 encoding = 'UTF8'; 
CREATE DATABASE 
template0=# update pg_database set datistemplate = TRUE where datname = 'template1'; 
UPDATE 1 
template0=# \c template1 
You are now connected to database "template1". 
template1=# update pg_database set datallowconn = FALSE where datname = 'template0'; 
UPDATE 1 
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?