1

After installing rails and trying to install PostgreSQL in the terminal (following these instructions https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04),

I run into this when I try to set up a username using "sudo -u postgres createuser -s username":

'could not change directory to "/home/UbuntuUsername": Permission denied createuser: creation of new role failed: ERROR: role "UbuntuUsername" already exists'

How do I get around this? Any help would be greatly appreciated.

I'm completely new to Ubuntu (im running 14.04), so forgive me if this is simple to solve.

1 Answer 1

0

Looks like you already created a Postgres role called UbuntuUsername. Trying to do that the second time will result in an error as the role already exists. I think you can proceed with the instructions.

(the first error - "could not change directory..." is probably unimportant and harmless and is caused by sudo -u postgres ... executed in your home directory)

1
  • Thank you so much! I continued and everything seems to be working fine Commented Jul 1, 2015 at 22:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.