【发布时间】:2013-07-23 02:11:50
【问题描述】:
我第一次将应用部署到数字海洋,遇到了两个(可能更多)问题。
1) 将 gem 'unicorn' 添加到 Gemfile 后,我无法 bundle install。我发现kgio与windows不兼容。通过 capistrano 部署时是否必须存在 Gemfile.lock?我将如何解决这个问题?
group :production do
gem 'pg', '0.14.1'
gem "nginx"
gem 'unicorn'
end
2) 我在服务器上的 postgresql 上进行身份验证时遇到问题。
production:
adapter: postgresql
encoding: unicode
database: postgresql
pool: 5
username: postgresql
password: secret
我运行了这些命令(以及其他一些变体):
create user postgresql with password 'secret';
create database postgresql with owner postgresql;
每次我限制部署时,我都会收到此错误:
FATAL: Peer authentication failed for user "postgresql"
我尝试输入一个我知道不存在的无效用户名,一个无效但错误消息始终相同的数据库。根据 postgresql 网站,我应该得到不同的错误......
如果我能得到一些帮助,那就太棒了。谢谢!
【问题讨论】:
标签: ruby-on-rails postgresql deployment capistrano unicorn