Postgres: creating a username

I am trying to get started with Postgres on Rails applications on a Mac. I created a new rails application called "shawsome" and in the database.yml file he created this

development:
adapter: postgresql
  encoding: unicode
  database: shawsome_development
  pool: 5
  username: shawsome
  password:

But the server will not work, because there is no role for "shawsome". Rails just seemed to get the username out of my application name.

I looked at the postgres documentation and talked about the CREATE USER command

CREATE USER jonathan;

However, when I tried to make CREATE USER, he said no CREATE comment was found.

Can someone tell me what I am doing wrong?

, ( Heroku), , . ? , , - Heroku?

+3
2

TheDelChop :

createuser -P

(-P - )

, , , db. , , - .

:

createdb -O ROLE_NAME_FROM_PREVIOUS_STEP NEW_DATABASE_NAME

, .

+3

pg createuser bash/zsh. , , .yml , Heroku .

0

All Articles