我尝试在termux中创建一个ruby on rails应用程序,我已经安装了必要的gem和软件包,但是在执行rails db:create
时,我得到了这个错误
rails aborted!
ActiveRecord::ConnectionNotEstablished: connection to server on socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
Caused by:
PG::ConnectionBad: connection to server on socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
1条答案
按热度按时间deyfvvtc1#
您需要手动启动PostgreSQL服务器,以便您的应用程序能够连接到。
通过
pkg install postgresql
安装postgresql有关示例设置说明https://wiki.termux.com/wiki/Postgresql,请参阅wiki