Rails Project uses PostgreSQL database to start times error

Source: Internet
Author: User

Problem Description:


[* * * @localhost *****]$ rails S

= Booting Webrick

= = Rails 3.2.19 application starting in development on http://0.0.0.0:3000

= = Call With-d to detach

= = Ctrl-c to shutdown server

Exiting

/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.19/lib/active_record/connection_adapters/ Postgresql_adapter.rb:1222:in ' Initialize ': Could not connect to Server:connection refused (Pg::connectionbad)

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?

Workaround: sudo service PostgreSQL start

Rails Project uses PostgreSQL database to start times error

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.