创建rails数据库时出错

时间:2014-10-25 03:20:48

标签: ruby-on-rails ruby postgresql

我正在尝试启动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

1 个答案:

答案 0 :(得分:0)

尝试psql -U ruby -d postgres -W ruby123确认用户有权访问。

可能$ bin/rake db:create正如错误消息所示解决问题。