EDIT June 2017: As the usual one-time packages for this unique problem seem to be outdated, I would recommend trying the approach presented by Benji in this answer . Use heroku-buildpack-multi and heroku-buildpack-apt with Aptfile to specify dependencies.
Steve Tooke also has an excellent review on this very topic:
http://tooky.co.uk/using-charklock_holmes-on-heroku/ - note that things may have changed in 3 years since this one was asked question, but you need to remember that generic / supported, and not specific / unsupported, is the best way to work with buildpacks.
Original answer:
While Ryan's answer works, he also slows down the deployment time to my tests - up to 15 minutes. I even came across several times the deployment interval of Heroku.
A simpler solution (which does not affect deployment time) is to use Heroku buildpack
Aaron Severs created a buildpack that includes icu4c (which charlock_holmes relies on) in dyno build. [cm. here]
Steps to get it working (Copied from Aaron's comment for posterity):
- Install the CLI buildpack:
heroku plugins:install https://github.com/heroku/heroku-buildpacks - Install buildpack in the fork of Aaron
heroku buildpacks:set frederick/heroku-buildpack-ruby -a myapp - In your Gemfile use:
gem 'charlock_holmes'
source share