I\'m setting up a new instance of a Rails(2.3.5) app on Heroku using Amazon RDS as the database. I\'d like to use UTF-8 for everything. Since RDS isn\'t UTF-8 by default, I set
There's a simpler way. You can specify the encoding in your DB connection string. Edit the RDS add-on, and append ?encoding=utf8&collation=utf8_general_ci
Worked well for me, no changes to the project.
e.g.:
mysql://user:pass@abc.rds.amazonaws.com/my-db?encoding=utf8&collation=utf8_general_ci
Reference: http://blog.arvidandersson.se/2011/09/27/setting-activerecord-connection-to-utf8-on-heroku