Blog tutorial and postgres

I

Ivan K.

Hello;

I have begun the "Getting Started with Rails" guide at
http://guides.rubyonrails.org/getting_started.html
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
 
B

Brian Candler

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top