1. 安装驱动
gem install postgres-pr
2.修改database.yml文件
development/test/production:
adapter: postgresql
database: database #数据库名
username: uid #用户名
password: pwd #密码
host: localhost #服务器地址
配置PostgreSQL数据库
本文介绍如何通过安装驱动并配置database.yml文件来连接PostgreSQL数据库,包括设置适配器、数据库名称、用户名、密码及服务器地址。
1. 安装驱动
gem install postgres-pr
2.修改database.yml文件
development/test/production:
adapter: postgresql
database: database #数据库名
username: uid #用户名
password: pwd #密码
host: localhost #服务器地址
810

被折叠的 条评论
为什么被折叠?