-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi
I tried following code and got error:
require 'pat'
@postcode = Pat.get("N1 1AA")
@response=
#<Rack::Response:0x007fc9ac0c08f0
@block=nil,
@Body=
["\n\n\n\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n\t<meta name="generator" content="Phusion Passenger">\n\t<title>Web application could not be started</title>\n\t<style type="text/css">\n\t\tbody {\n\tfont-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif;\n\tfont-size: 10pt;\n\tbackground: white;\n\tcolor: #222222;\n\tmargin: 0;\n\tpadding-top: 3em;\n\tpadding-bottom: 3em;\n\tpadding-left: 4.5em;\n\tpadding-right: 4.5em;\n}\n\nh1 {\n\tfont-size: 17pt;\n\tfont-weight: medium;\n\tcolor: #533e72;\n\tborder-bottom: 1px solid #533e72;\n}\n\nh1.title {\n\tmargin-top: 0;\n}\n\nh1.error_title {\n\tcolor: red;\n\tborder-bottom: 1px solid red;\n}\n\na {\n\ttext-decoration: none;\n}\n\na:hover {\n\ttext-decoration: underline;\n}\n\ndt {\n\tfont-weight: bold;\n\tcolor: #280050;\n}\n\ndd {\n\tmargin-top: 0.5em;\n\tmargin-bottom: 1em;\n}\n\n.commands {\n\tborder: 1px solid #b594e7;\n\tbackground: #ddc6ff;\n\tpadding: 0.5em;\n\tmargin: 0.5em;\n\tfont-family: 'Bitstream Vera Sans Mono', 'Courier New', Monospace;\n}\n\npre {\n\toverflow: auto;\n\twhite-space: pre-wrap;\n\ttext-align: left;\n}\n\ntable.backtrace th {\n\tbackground: #8470a6;\n\tcolor: white;\n}\n\ntable.backtrace th,\ntable.backtrace td {\n\tpadding: 0.2em;\n\tpadding-left: 0.4em;\n\tpadding-right: 0.4em;\n}\n\ntable.backtrace tr td {\n\tbackground: #ecdfff;\n}\n\ntable.backtrace tr.even td {\n\tbackground: #f7f2ff;\n}\n\ntable.backtrace td.index {\n\tfont-weight: bold;\n}\n\n#site_footer {\n\tborder-top: solid 1px black;\n\tmargin-top: 1em;\n\tpadding-top: 1em;\n\tfont-size: small;\n\tcolor: #777777;\n}\n\n#site_footer a {\n\tcolor: #65498e;\n}\n\n#site_footer a:hover {\n\tcolor: #9681d9;\n}\n\n#site_header .corporate_identity {\n\tdisplay: none;\n}\n\n\t</style>\n\t<link rel="stylesheet" type="text/css" href="http://www.modrails.com/error_pages/1.0/error_page.css">\n\t<style type="text/css">\n\t\tdd {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\tdd pre {\n\t\t\tmargin-top: 0;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t</style>\n\n\n\n\n\t<div id="site_container">\n\t\t<div id="site_header">\n\t\t\t<ul class="corporate_identity">\n\t\t\t\t<li class="logo"><a href="https://www.phusionpassenger.com">Phusion Passenger\n\t\t\t\n\t\t\n\t\t<div id="site_body">\n\t\t\t<h1 class="error_title">Web application could not be started\n\t\t\t<div id="content">\n\t\t\t\t
could not connect to server: Connection refused\n\tIs the server running on host "localhost" (127.0.0.1) and accepting\n\tTCP/IP connections on port 5432?\n (PG::ConnectionBad)\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:ininitialize'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:<wbr>1222:<wbr>innew'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:inconnect'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/postgresql_adapter.rb:<wbr>324:<wbr>ininitialize'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-postgis-adapter-0.6.6/lib/active_record/connection_adapters/postgis_adapter/rails3/main_adapter.rb:48:ininitialize'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-postgis-adapter-0.6.6/lib/active_record/connection_adapters/postgis_adapter/rails3/create_connection.rb:<wbr>85:<wbr>innew'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-postgis-adapter-0.6.6/lib/active_record/connection_adapters/postgis_adapter/rails3/create_connection.rb:85:inpostgis_connection'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:<wbr>315:<wbr>innew_connection'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/rgeo-activerecord-0.5.0/lib/rgeo/active_record/ar_factory_settings.rb:214:innew_connection'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:<wbr>325:<wbr>incheckout_new_connection'\n /var/www/uk-postcodes/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/conne