I'm trying to get my application working w/ Travis CI but I keep getting: FATAL: role "skateparks" does not exist
. Any ideas on what I could be doing wrong? I've followed their documentation.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
由 翻译强力驱动
问题:
回答1:
For the record, put something like this in your .travis.yml
:
before_script: - psql -c "CREATE USER skateparks WITH PASSWORD 'skateparks';" -U postgres
回答2:
Your database.yml
has this:
development: adapter: postgresql encoding: utf8 database: skateparks_development username: skateparks password: template: template0 # Required for UTF8 encoding
Note the username: skateparks
part. Either drop that or create the role with something like:
create role skateparks login
from the psql
shell.
回答3:
This worked for me
from bash...
createuser blog
from psql prompt
ALTER USER blog CREATEDB;
my database.yml
development: adapter: postgresql encoding: unicode database: blog_development pool: 5 username: blog password: