ruby-on-rails – 使database.yml文件在OSX上的Rails中运行
发布时间:2020-12-16 19:30:44 所属栏目:百科 来源:网络整理
导读:我知道在osx上使用postgres有点困难,因为它有自己的版本运行,所以为了psql到它你需要提供像这样的主机名 psql -h localhost mydatabasename -U me 但是,如何为您的database.yml文件执行此操作以获取所有轨道可爱性. 如果您尝试连接 development: adapter: po
我知道在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的任何想法都不要吮吸这么多?! 解决方法
如果您能够使用psql连接到localhost上的Postgres,那么只需添加:
host: localhost 到database.yml (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |