If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > Posgresql 9.1 and Webrick

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-11, 13:30
hlogoma hlogoma is offline
Registered User
 
Join Date: Oct 2011
Posts: 9
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.

Thanks,

Tom.
Reply With Quote
  #2 (permalink)  
Old 11-10-11, 17:13
hlogoma hlogoma is offline
Registered User
 
Join Date: Oct 2011
Posts: 9
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,

tom.
Reply With Quote
Reply

Tags
postgresql9.1

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On