我绝不是代码开发人员。我们的代码开发人员退出了,我刚刚获得了该项目。因此,我正在尝试学习代码,同时解决发生的问题。这是我目前面临的问题。我需要在两个不同的表中添加新列,我按照指示进行了三次单独的Active Record Migrations。当我尝试使用更新schema.rb时 $ rake db:migrate 我得到了以下内容。
[pcms -update to 4.4 (master)]$ rake db:migrate
WARNING: Nokogiri was built against LibXML version 2.9.2, but has
dynamically loaded 2.8.0
I, [2017-07-20T08:57:20.436515 #64621] INFO -- : ** [Raven] Raven 0.13.0
configured not to send errors.
rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
的database.yml
development:
adapter: postgresql
database: pcms_development
host: localhost
test:
adapter: postgresql
database: pcms_test
host: localhost