Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:07:46+00:00 2026-06-12T15:07:46+00:00

I am new to Ruby on rails. I’ve created two basic demo apps by

  • 0

I am new to Ruby on rails. I’ve created two basic demo apps by tutorial learning by examples

and suddenly it stops working for my new sample app.

I have generated a controller Pages and two actions home and contact and nothing fancy.

Now, I am not able to open any pages, except the default index.html rails page at localhost:3000. The page at localhost:3000/pages/home and localhost:3000/pages/contact returns this error.

PG::Error

server closed the connection unexpectedly This probably means the
server terminated abnormally before or while processing the request.

and sometimes (usually when I restart postgresql),

PG::Error

server closed the connection unexpectedly This probably means the
server terminated abnormally before or while processing the request.
could not send startup packet: Broken pipe

This is my stack trace

activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in
initialize' activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in
new’ activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:1213:in
connect' activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:329:in
initialize’ activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:28:in
new' activerecord (3.2.8)
lib/active_record/connection_adapters/postgresql_adapter.rb:28:in
postgresql_connection’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:309:in
new_connection' activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:319:in
checkout_new_connection’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:241:in
block (2 levels) in checkout' activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in
loop’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in
block in checkout'
/home/jashwant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:233:in
checkout' activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in
block in connection’
/home/jashwant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in
connection’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:404:in
retrieve_connection' activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_specification.rb:170:in
retrieve_connection’ activerecord (3.2.8)
lib/active_record/connection_adapters/abstract/connection_specification.rb:144:in
connection' activerecord (3.2.8)
lib/active_record/query_cache.rb:67:in
rescue in call’ activerecord
(3.2.8) lib/active_record/query_cache.rb:61:in call' activerecord
(3.2.8)
lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in
call’ actionpack (3.2.8)
lib/action_dispatch/middleware/callbacks.rb:28:in block in call'
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in
run_3261957284442330683_call_599627944998934036__callbacks’
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in
__run_callback' activesupport (3.2.8)
lib/active_support/callbacks.rb:385:in
_run_call_callbacks’
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in
run_callbacks' actionpack (3.2.8)
lib/action_dispatch/middleware/callbacks.rb:27:in
call’ actionpack
(3.2.8) lib/action_dispatch/middleware/reloader.rb:65:in call'
actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in
call’ actionpack (3.2.8)
lib/action_dispatch/middleware/debug_exceptions.rb:16:in call'
actionpack (3.2.8)
lib/action_dispatch/middleware/show_exceptions.rb:56:in
call’
railties (3.2.8) lib/rails/rack/logger.rb:26:in call_app' railties
(3.2.8) lib/rails/rack/logger.rb:16:in
call’ actionpack (3.2.8)
lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1)
lib/rack/methodoverride.rb:21:in
call’ rack (1.4.1)
lib/rack/runtime.rb:17:in call' activesupport (3.2.8)
lib/active_support/cache/strategy/local_cache.rb:72:in
call’ rack
(1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.8)
lib/action_dispatch/middleware/static.rb:62:in
call’ railties (3.2.8)
lib/rails/engine.rb:479:in call' railties (3.2.8)
lib/rails/application.rb:223:in
call’ rack (1.4.1)
lib/rack/content_length.rb:14:in call' railties (3.2.8)
lib/rails/rack/log_tailer.rb:17:in
call’ rack (1.4.1)
lib/rack/handler/webrick.rb:59:in service'
/home/jashwant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in
service’
/home/jashwant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in
run'
/home/jashwant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in
block in start_thread’

I am not using database for now. I tried to do rake db:migrate but it returns the same error.

I am on Ubuntu 12.04 (as some bugs on google were related to ubuntu)

I have found similar questions on SO, but they are experiencing at some advance stage and thus involves some advance solutions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:07:47+00:00Added an answer on June 12, 2026 at 3:07 pm

    Although, I am not using the database but specifying the port in configuration in database.yml solves the problem. By default, the rails new <app_name> --database=postgresql command does not put a port there.

    Here’s my config.

    development:
      adapter: postgresql
      encoding: unicode
      database: sample_app_development
      pool: 5  
      port: 5433
      username: myusername
      password: mypassword
      reconnect: true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Ruby on Rails and am working my way through the tutorial
New to Ruby on Rails and having a problem when following Michael Hartl's tutorial.I'm
I created a new Ruby on Rails 3.0.1 project, and then globally updated gems
I created a new Ruby on Rails 3.0.1 project, and then globally updated gems
Disclaimer : I am totally new to Ruby on Rails but planning learning it.
i'm new to ruby on rails and am working with version 2.3 on mac
I am new to Ruby on Rails, I have completed the Blog Tutorial .
I'm new to ruby/rails and trying to build a simple Projects / Tags app
I'm new in Ruby/Rails, so, my question: what is the perfect way to upload
I'm currently evaluating options for adding sub-domain support to a new Ruby on Rails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.