views:

92

answers:

1

I'm just starting with the depot application in the Pragmatic Programmer's Rails book. When I try doing a rake db:create RAILS_ENV-'development' after creating a rails application, I get the following error:

Couldn't create database for {"encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"depot_development", "pool"=>5, "password"=>nil, "socket"=>"/tmp/mysql.sock"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a matching collation)

My my.cnf looks like this:

[mysqld] character-set-filesystem=UTF8 character-set-server=UTF8 default-collation=UTF8_general_ci default-character-set=UTF8

[client] default-character-set=UTF8

[mysqldump] default-character-set=UTF8

What am I doing wrong?

+1  A: 

This turned out to be an issue with snow leopard.

this was solved via:

sudo gem uninstall mysql sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Eric Smith