Jason’s Ranting & Raving

Those who don’t read have no advantage over those who can’t.

Archive for August, 2010

Programming: Rails with Postgres – Couldn’t create database

Posted by jaystile on August 31, 2010

Hello internet community! I wanted to share something with you that you may encounter. I was setting up a postgres database and trying to use rake db:create to create the sample database from the getting started tutorial.

I kept getting an error like:

Read error message: FATAL: Ident authentication failed for user "blog_development
Couldn't create database for {"encoding"=>"unicode", "username"=>"blog_development", "adapter"=>"postgresql", "database"=>"blog_development", "pool"=>5, "password"=>"tmppass"}

The default Ubuntu Postgres installation requires both a system user and a database user with matching user IDs. It turns out I had to change a setting in postgres to allow connections from just database users.

vi /etc/postgresql/8.4/main/pg_hba.conf
Change the line
local all all ident
local all all md5

Note: You cannot have two of the same defined combinations. The first once wins, when I had put “local all all ident” followed by “local all all md5” the second didn’t get defined. That caused me a couple of hours of heartache.


Posted in Programming | Tagged: , , | 1 Comment »

Book Review: SuperFreakonomics by Levitt & Dubner

Posted by jaystile on August 15, 2010


My friend from work loaned me SuperFreakonomics by Steven D. Levitt and Stephen J. Dubner. Thanks buddy! I was really looking forward to reading it. Before I get to the review, I just wanted to point out that I was so astounded by Freakonomics that I pre-ordered SuperFreakonomics for another friend that loaned me the original Freakonomics.

I only have this to say, “I LOVE FREAKONOMICS!” The process of bringing economic research techniques to areas other than finance produce interesting results. If you’ve never read this type of book, you will be pleasantly surprised. Freakonomics investigates human behavior and try and unravel the reasons why people behave the way they do. They break down the behavior and find the incentives. I’m not going to go on too much, but I love it when people break down the conventional wisdom. While most people I’ve chatted with ranked SuperFreakonomics higher than Freakonomics, I would disagree. You can read my review on Freakonomics here.

There is only about 200 pages of content in the book and I read through it over the weekend. Lots of fun and worth your time. Enjoy!

Posted in Book Review | Tagged: , , , | Leave a Comment »