# Blog tutorial and postgres

**URL:** <https://www.ruby-forum.com/t/blog-tutorial-and-postgres/193519>\
**Category:** Ruby\
**Created:** [August 19, 2010, 4:00am UTC](https://www.ruby-forum.com/t/blog-tutorial-and-postgres/193519 "2010-08-19T04:00:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skywriter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c57346/32.png) [@skywriter](https://www.ruby-forum.com/u/skywriter)\
**Post date:** [August 19, 2010, 4:00am UTC](https://www.ruby-forum.com/t/blog-tutorial-and-postgres/193519/1 "2010-08-19T04:00:55Z")

</div>

Hello;

I have begun the “Getting Started with Rails” guide at

> **[Getting Started with Rails — Ruby on Rails Guides](https://guides.rubyonrails.org/getting_started.html)**
>
> Getting Started with RailsThis guide covers getting up and running with Ruby on Rails.After reading this guide, you will know: How to install Rails, create a new Rails application, and connect your application to a database. The general layout of a...

which is supposed to create a simple blog.

I execute the command “rails blog -d postgresql” without incident.

I am having trouble with the next command in the tutorial:  
“rake db:create”.

The first time, I received the messages:

FATAL: role “blog” does not exist  
…  
Couldn’t create database for {“encoding”=\>“unicode”,  
“username”=\>“blog”,  
“adapter”=\>“postgresql”, “database”=\>“blog\_development”,  
“pool”=\>5, “password”=\>“xxxxyyy”}

So I created the postgres account blog and gave that account the  
ability to create databases and users. Now that same command  
““rake db:create”” yields these messages:

undefined method `quote\_ident’ for PGconn:Class  
…  
Couldn’t create database for {“encoding”=\>“unicode”,  
“username”=\>“blog”,  
“adapter”=\>“postgresql”, “database”=\>“blog\_development”,  
“pool”=\>5, “password”=\>“xxxxyyy”}

So what is the issue here? Should I have created the three  
user accounts before hand?

Could I just create the “blog” database before hand at the  
postgres prompt? If so, are there any tables that the  
“rails blog -d postgresql” creates?

Thank you for your help.

P.S. my config/database.yml looks like this:

development:  
adapter: postgresql  
encoding: unicode  
database: blog\_development  
pool: 5  
username: blog  
password: xxxxyyy

test:  
adapter: postgresql  
encoding: unicode  
database: blog\_test  
pool: 5  
username: blog  
password: xxxxyyy

production:  
adapter: postgresql  
encoding: unicode  
database: blog\_production  
pool: 5  
username: blog  
password: xxxxyyy

---

<div class="post-metadata">

**Author:** ![skywriter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c57346/32.png) [@skywriter](https://www.ruby-forum.com/u/skywriter)\
**Post date:** [August 19, 2010, 11:56am UTC](https://www.ruby-forum.com/t/blog-tutorial-and-postgres/193519/2 "2010-08-19T11:56:18Z")

</div>

Sorry, but you’re much more likely to get questions about Rails answered  
on a Rails mailing list.

This one is for Ruby, the programming language. Rails is a project which  
just happens to be written _in_ Ruby.

Regards,

Brian.
