我正在尝试启动rails项目,当我尝试使用“rake db:create”创建数据库时,收到以下内容:
postgresql_adapter.rb:898:in 'rescue in connect': FATAL: database "Real_Estate_development" does not exist
Run '$ bin/rake db:create db:migrate' to create your database (ActiveRecord::NoDatabaseError)
我的database.yml包含:
development: &default
adapter: postgresql
database: Real_Estate_development
username: "ruby"
password: "ruby123"
encoding: utf8
host: localhost
min_messages: warning
pool: 2
timeout: 5000
答案 0 :(得分:0)
尝试psql -U ruby -d postgres -W ruby123
确认用户有权访问。
可能$ bin/rake db:create
正如错误消息所示解决问题。