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 8545157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:43:44+00:00 2026-06-11T12:43:44+00:00

Just started a new app with rails <appname> new -d postgresql I recently installed

  • 0

Just started a new app with

rails <appname> new -d postgresql

I recently installed Postgres, and this is my first time trying to use it with an app. I generated a whole bunch of models, then ran rake db:migrate and got the following error:

rake aborted!
could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Does this mean that I installed Postgres incorrectly? Any idea what I should fix? Or does the problem have to do with trying to migrate several models at once? Sorry if this is a dumb question. I’m new to both Rails and postgres.

—– MY DATABASE.YML —–

development:
  adapter: postgresql
  encoding: unicode
  database: <appname>_development
  pool: 5
  username: <appname>
  password:

  # Connect on a TCP socket. Omitted by default since the client uses a
  # domain socket that doesn't need configuration. Windows does not have
  # domain sockets, so uncomment these lines.
  #host: localhost
  #port: 5432

  # Schema search path. The server defaults to $user,public
  #schema_search_path: myapp,sharedapp,public

  # Minimum log levels, in increasing order:
  #   debug5, debug4, debug3, debug2, debug1,
  #   log, notice, warning, error, fatal, and panic
  # The server defaults to notice.
  #min_messages: warning

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: postgresql
  encoding: unicode
  database: <appname>_test
  pool: 5
  username: <appname>
  password:

production:
  adapter: postgresql
  encoding: unicode
  database: <appname>_production
  pool: 5
  username: <appname>
  password:

— Executed initdb /usr/local/var/postgres -E utf8 —

Got the following:

initdb /usr/local/var/postgres -E utf8
The files belonging to this database system will be owned by user "sashafklein".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default text search configuration will be set to "english".

initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
  • 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-11T12:43:45+00:00Added an answer on June 11, 2026 at 12:43 pm

    Did you create a config/database.yml?

    This basically holds the connection information for Postgres

    looks something like this

    development:
      adapter: postgresql
      encoding: unicode
      database: <appname>_development
      pool: 5
      username: <username>
      password: <password>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started a brand new rails project and the first task I'm trying
I just started a new rails app using rails new myapp --database=postgresql Then I
I just recently started this ruby on rails tutorial to kick off my new
My rails app just started receiving this error today. Here is the code context.
Super stumped by why Postgres isn't working on a new app I just started.
I started up a completely new Rails and Facebook app and followed this guide
I just started a new Typo3 4.6 site and I found this weird line
I just started out with a new site and I decided to use DOMImplementation
I have started developing a new Rails app on my server using RVM, Rails
I'm creating my first ROR application. Details: creating new app -> rails new simple_cms

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.