Mad*_*ina 8 authentication postgresql ruby-on-rails
我正在为我的大学开发一个Rails应用程序.该应用程序是由前一年的学生开始的,现在是我和我的同事转而继续工作.我从github上获取了应用程序,我运行了bundle install,但是什么时候运行rake db:migrate我得到了这个PG::ConnectionBad: FATAL: password authentication failed for user "alphauser".在database.yml我有这些
development:
adapter: postgresql
encoding: unicode
database: alpha_database
host: localhost
pool: 5
username: alphauser
password: alphapassword
Run Code Online (Sandbox Code Playgroud)
我不知道在这种情况下该怎么做.
Mik*_*ski 12
您必须手动创建相应的用户和数据库,如下所示:
在shell中:
psql
然后:
create user alphauser with password 'alphapassword';
create database alpha_database owner alphauser;
alter user alphauser superuser createrole createdb replication;
\q
Run Code Online (Sandbox Code Playgroud)
不要忘记分号.
| 归档时间: |
|
| 查看次数: |
14287 次 |
| 最近记录: |