尝试设置 Padrino Web 框架以使用以下信息连接到我的本地 PostgreSQL 数据库:
数据库
List of databases
| Name | Owner
|------------------------|------------
| postgres | postgres
| template0 | postgres
| template1 | postgres
|trustmob_ui_development | postgres
|trustmob_ui_production | postgres
|trustmob_ui_test | postgres
(6 rows)
配置/数据库 .rb https://gist.github.com/1046031
ActiveRecord::Base.configurations[:development] = {
:adapter => 'postgresql',
:host => 'localhost',
:port => '5432',
:database => 'trustmob_ui_development',
:username => 'postgres',
:password => ''
}
当我尝试运行时padrino rake ar:migrate
,出现以下错误。完整的错误要点在这里:https ://gist.github.com/1046044
rake aborted!
ActiveRecord::ConnectionNotEstablished
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/....
不知道我做错了什么。如何让 Padrino 查看/与数据库对话?
~丹