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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:38:13+00:00 2026-06-02T17:38:13+00:00

Im trying to use rails with postgresql and I set everything up properly with

  • 0

Im trying to use rails with postgresql and I set everything up properly with the download and gems.

I generated a new rails project with postgresql using this command:

rails new demo_app -d postgresql
rake db:create all

Here is my databse.yml file contents:

development:
adapter: postgresql
encoding: unicode
database: demo_app_development
pool: 5
username: 
password: guess_password

this didnt work: got the following error

AM @~/Documents/RailsWS/demo_app >rake db:create:all
FATAL:  password authentication failed for user "AM"

So the issue is the user name and password combination. However, I dont remember what I put in when I downloaded and set up postegresql. Is there anyway I can reset the username and password and start from scratch with a new username and password?

Thanks

  • 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-02T17:38:14+00:00Added an answer on June 2, 2026 at 5:38 pm

    After installation you can run the following in the terminal:

    createuser -P
    

    (The -P is to add a password)

    It will ask you for name, password, whether they are a superuser, can create new roles, and can create new db’s. You probably won’t need any of those permissions for rails.

    Then create the database to run with the following role you created:

    createdb -O ROLE_NAME_FROM_PREVIOUS_STEP NEW_DATABASE_NAME
    

    And viola, you should be good to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get mysql gem installed for use on rails, using jruby, can't
I'm trying to use setup the rails application on apache2 using the virtual server
I'm trying to use the new Sidekiq gem in my rails application but when
I am trying to use PDFKit using rails 3, I followed the railscast tutorial
I'm trying to use Chronic inside my non-rails project. When I try to get
I am trying to use emacs for my rails project. I am kind of
I'm trying to use paperclip with rails 3.1 but I keep getting this routing
I've been trying to use Rails and when I use rake, I get this
I'm trying to use postgresql with my rails development on Lion. My machine is
I am new to Rails and I am trying to use omniauth with 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.