Rails and PostgreSQL: Role postgres does not exist

前端 未结 13 2165
一整个雨季
一整个雨季 2020-12-07 07:51

I have installed PostgreSQL on my Mac OS Lion, and am working on a rails app. I use RVM to keep everything separate from my other Rails apps.

For some reason when I

13条回答
  •  -上瘾入骨i
    2020-12-07 08:50

    After a bunch of installing and uninstalling of Postgres, here's what now seems to work consistently for me with Os X Mavericks, Rails 4 and Ruby 2.

    1. In the database.yml file, I change the default usernames to my computer's username which for me is just "admin".

    2. In the command line I run rake db:create:all

    3. Then I run rake db:migrate

    4. When I run the rails server and check the local host it says "Welcome aboard".

提交回复
热议问题