【发布时间】:2020-05-17 22:51:33
【问题描述】:
希望有人可以在这里帮助我: 我有 * 将我应用程序中的数据库从 sqlit3 更改为 postgresql, * 将 gemfile 替换为 gem 'pg', * 更新database.yml
所有这些,都是为了能够部署到heroku。
当我跑步时
rake db:setup
我收到以下错误:
DEPRECATION WARNING: Single arity template handlers are deprecated. Template handlers must
now accept two parameters, the view object and the source for the view object.
Change:
>> Coffee::Rails::TemplateHandler.call(template)
To:
>> Coffee::Rails::TemplateHandler.call(template, source)
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Couldn't create 'school-grades-project' database. Please check your configuration.
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
我读到 jbuilder 应该注意这个问题,所以我升级了 jbuilder,但问题仍然存在。
希望能得到一些帮助。 谢谢,
【问题讨论】:
-
将coffee-rails gem 升级到更高版本(5.0.0)时,第一个警告被消除了。但是还是有连接不上服务器的问题
-
您的 postgresql 实例没有监听 5432。您确定它正在运行吗?
-
现在,我收到此错误消息:PG::ConnectionBad: could not connect to server: No such file or directory 服务器是否在本地运行并接受 Unix 域套接字上的连接“/var/pgsql_socket /.s.PGSQL.5432"?
-
错误信息和Josh Brody's comment中的问题的答案是什么?
-
是的,postgresql 正在运行...
标签: ruby-on-rails ruby rubygems