# Rails, rake and postgresql roles

**URL:** <https://www.ruby-forum.com/t/rails-rake-and-postgresql-roles/169242>\
**Category:** Rails\
**Created:** [June 1, 2009, 9:55am UTC](https://www.ruby-forum.com/t/rails-rake-and-postgresql-roles/169242 "2009-06-01T09:55:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajax](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a87d85/32.png) [@Ajax](https://www.ruby-forum.com/u/Ajax)\
**Post date:** [June 1, 2009, 9:55am UTC](https://www.ruby-forum.com/t/rails-rake-and-postgresql-roles/169242/1 "2009-06-01T09:55:18Z")

</div>

Hello!

I have a problem when running db:create in a newly created rails  
project.

With a project named ‘yoyo’ as an example, rake db:create gives me the  
response

FATAL C28000 Mrole “yoyo” does not exist Fmiscinit.c L420  
RInitializeSessionUserId  
[…many lines of traceing…]  
Couldn’t create database for {“encoding”=\>“unicode”,  
“username”=\>“lapis”,  
“adapter”=\>“postgresql”, “password”=\>nil,  
“database”=\>“lapis\_development”,  
“pool”=\>5}  
$

… whereas if I create a project with the name of an existing psql role  
(for  
example my own user name), things go well. What is this stuff? Must I  
create  
psql roles for each project now? Would be kinda weird.

Last summer when I was doing rails stuff this worked without any  
problems.  
Since then, of course both ruby, rails and postgres versions have  
changed.

The current versions I have on my MacBook pro (OSX 10.5.7) are:

$ psql --version  
psql (PostgreSQL) 8.3.3  
$ ruby -v  
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]  
$ rails -v  
Rails 2.3.2

What gives? I so wanna go by rails (toot-toot!) right now. Sniff.

/Your friend - me

–  
View this message in context:  
[http://www.nabble.com/Rails%2C-rake-and-postgresql-roles-tp23810901p23810901.html](http://www.nabble.com/Rails%2C-rake-and-postgresql-roles-tp23810901p23810901.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).
