【发布时间】:2018-05-21 21:40:41
【问题描述】:
当我使用 eb deploy 在 aws beanstalk 上部署我的应用程序时出现错误
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
.ebextensions/postgres.config:
packages:
yum:
postgresql93-devel: []
config/database.yml:
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
production:
<<: *default
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
【问题讨论】:
-
在您要部署到的环境下,您的数据层配置中是否有 RDS 实例?
标签: ruby-on-rails postgresql amazon-web-services amazon-ec2 amazon-rds