我知道在osx上使用postgres有点困难,因为它有自己的版本运行,所以为了psql到它你需要提供像这样的主机名
psql -h localhost mydatabasename -U me
但是,如何为您的database.yml文件执行此操作以获取所有轨道可爱性.
如果您尝试连接
development: adapter: postgresql username: me database: mydatabasename
你收到了经典
Couldn't create database for {"adapter"=>"postgresql","username"=>"me","database"=>"mydatabasename"} could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGsql.5432"?
关于如何提供信息或配置osx的任何想法都不要吮吸这么多?!