For some reason on most Ubuntu releases the MySql package as installed through apt-get sets the default encoding for latin1. You can happily run your RoR app this way for a long time, and maybe forever, until you have to save a curly quote or maybe even a "主頁" label somewhere, at which point you get 500 errors and everthing starts to complain that these characters are not latin1. Documentation on how to do this are on the msyql site here, but in short add these to the respective sections in your /etc/mysql/my.cnf. (Other distros will have this in a different location, like maybe /etc/my.cnf)
The following is for MySql 5.5, refer to the mysql docs to make sure they are the same for your version of MySql.
[client] default-character-set=utf8 [mysqld] collation-server = utf8_unicode_ci init-connect='SET NAMES utf8' character-set-server = utf8 [mysql] default-character-set=utf8
Note that any databases and tables created before these configuration settings are put in will be in the default encoding. You will have to use an alternate method to convert those databases to utf8. I'll post how I did this in a subsequent post.