I have a web-app that was done in Rails 1.2.3 and I have just migrated it to rails 2.2.2 and upon deploy the app broke. It turns out I needed to install the MySQL gem since rails 2.2.2 needs this.
So, I did install it but I had to install with "sudo gem install mysql -- -with-mysql-config" (as per http://brantinteractive.com/2007/02/16/getting-the-mysql-gem-installed-on-ubuntu/) and that seemed to do the trick. I am on Ubuntu 6.06.2 LTS Dapper.
The app wouldn't boot up in production still. So I booted with script/console production and this is what came back:
Loading production environment (Rails 2.2.2)
Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:548:in `real_connect':Mysql::Error: Can't initialize character set utf8 (path: /usr/share/mysql/charsets/)
>>
I did some searching around on this error and somebody said that the mysql client I am using (the MySQL gem!) isn't connecting using UTF8. I don't know how to install this gem any other way so that it installs correctly. Any ideas?