Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011

    Unanswered: Posgresql 9.1 and Webrick

    I have Rails 3.1.1 and Ruby 1.9.3 installed as well as postgresql 9.1 on Ubuntu 11.10.

    I started Rails S and webrick worked just fine .... the Ruby on Rails welcome page displayed as one expected but once I clicked on 'your applications environment' I got this error: PGERROR: FATAL: role "tom" does not exist

    Checking the manual it indicates that possibly I have a postgresql user name that is different from my login name ... I think this is correct.

    The manual then suggests that one could use the -U switch or use the PGUser environment variable to specify my postgresql user name.

    I have not been able to find out how to do that. Could anyone give me a pointer or suggestion as to how I go about either using the -U switch or how to set the PGUser environment variable?

    My problem is that I do not quite understand where I can use either of these options. Do I sign in as su postgres. If so my prompt is postgres@ubuntu:/home/tom$. What would I type in at this prompt to achieve the goal of making sure that I have the correct 'role' such that I do not get the PGERROR. OR Do I use psql at this prompt which then kicks me to this prompt, postgres=#.

    My apologies if this sounds confusing, but plainly I am confused and would appreciate any help you can spare.



  2. #2
    Join Date
    Oct 2011
    I finally found a solution.

    The database.yml file has user: but it should be username:.

    I corrected the file and all is working,

    Thanks anyway,


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts