Sadly the other two solutions don't work for me (see below), so I had to come up with my own solution. This solution works with Ruby 1.9.3 but hammady says it does not work with 2.0.0.
I used heroku-buildpack-multi
:
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
With the following .buildpacks
:
https://github.com/benjie/heroku-buildpack-apt
https://github.com/heroku/heroku-buildpack-ruby
And this Aptfile
:
libicu-dev
My fork of heroku-buildpack-apt
is required to export the BUNDLE_BUILD__CHARLOCK_HOLMES
variable via Heroku's ENV_DIRs. In the Gemfile you just reference gem 'charlock_holmes'
as usual and all works smoothly now for me.
If anyone can think of a way that doesn't involve exporting BUNDLE_BUILD__CHARLOCK_HOLMES
then please let me know!
Ryan's answer doesn't work for me - Heroku bails because the bundle install step doesn't offer any output for 3 minutes. Silasj's answer references the frederick/heroku-buildpack-ruby
buildpack which is no longer maintained and lags behind the official heroku-buildpack-ruby
by quite an amount, which is not acceptable to me.