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

  • Home
  • SEARCH
  • 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 7759251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:34:51+00:00 2026-06-01T13:34:51+00:00

I am using PostgreSQL 9.1.3 (PostgreSQL 9.1.3 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real (Ubuntu/Linaro 4.6.1-9ubuntu3)

  • 0

I am using PostgreSQL 9.1.3 (PostgreSQL 9.1.3 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1, 64-bit) and rails either 3.2.2 or 3.2.1 on ubuntu 11.10.

Now, I can connect with below command with PostgreSQL

  1. su postgres

    enter password and I can see postgres=#

  2. I am placing below details in my config/database.yml and executing “rails db” it is working fine.

    development:

    adapter: postgresql
    encoding: utf8
    reconnect: false
    database: sample_app_db
    pool: 5
    username: postgres
    password: passwordhere
    host: localhost
    

I am using rvm to access my rails environment. but when I start server using “rails s” command and hit url with “http://localhost:3000”, say – connection not establish.

  • 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-01T13:34:52+00:00Added an answer on June 1, 2026 at 1:34 pm

    try this way,

    sudo -u postgres createuser -D -P your-current-ubuntu-username
    

    and

    sudo -u postgres createdb -O your-current-ubuntu-username your-database
    

    open up this file /etc/postgresql/9.1/main/pg_hba.conf

    change this line only:

    local   all             all                                     peer
    

    to this:

    local   all             all                                     md5
    

    Don’t forget to restart the postgres server:

    sudo service postgresql restart
    

    Now check, with this command

    psql -d your-database -U your-current-ubuntu-username -W
    

    it should work

    This solutions works for postgresql-9.1, here is the way to install

    sudo apt-get install postgresql-9.1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now we are using PostgreSQL 8.3 (on Linux) as a database backend to
I've been using PostgreSQL a little bit lately, and one of the things that
I'm using postgresql 8.4 and am having a bit of a problem granting select
I'm using PostgreSQL database on Rails 2.3.8 and I need to restart auto increment
Using PostgreSQL triggers, is it possible to record the changes that have happened to
Since I'm using Postgresql and can't use LINQ to SQL, I wrote my own
I'm using PostgreSQL 9.1 and I have this data structure: A B ------- 1
I'm using PostgreSQL 9.1.13 Here is what I've done so far: /* First Array
I'm seeing strange behaviour when using PostgreSQL in a Hibernate/JPA environment with a single
Just had a discussion at work about the merits of using PostgreSQL over MySQL

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.