Note to self 19 Jan 2006 08:34 pm
How to set ENV for rake migrate
If you’re running a recent rails app and are on a host like DreamHost where the RAILS_ENV isn’t set, you’ll need to use this to run your migrations:
rake environment RAILS_ENV=production migrate
Otherwise you’ll get this:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
Or you’ll connect to your development database if you have one configured.