title: Install binary dependencies on Heroku
body: <p>I need to convert PDF to PNG on heroku, i'm using RMagick and for some PDF i run into this error :</p>
  
  <blockquote>
    <p>Ghostscript 8.628.62: : Unrecoverable error, exit code 1 Unrecoverable</p>
  </blockquote>
  
  <p>The same code runs fine on my local machine using Ghostscript 9.05</p>
  
  <p>I would like to update the version of Ghostscript being used on Heroku and see if that solves the problem.
  I followed these instruction to build ghostscript 9.05 on heroku :</p>
  
  <p><a href="http://theprogrammingbutler.com/blog/archives/2011/07/28/running-pdftotext-on-heroku/" rel="nofollow">http://theprogrammingbutler.com/blog/archives/2011/07/28/running-pdftotext-on-heroku/</a></p>
  
  <p>My problem is vendoring the resulting package, <strong>how can i tell heroku to use my custom version of ghostscript instead of the system one ?</strong></p>
  
  <p>Here is what i tried :</p>
  
  <ul>
  <li>Add the gs package under vendor/ghostscript/bin</li>
  <li>Add it to the heroku path : heroku config:add PATH=vendor/ghostscript/bin:/usr/bin:/bin</li>
  </ul>
  
  <p>My app still run on GS 8.62</p>
  
  <p>Any help would be greatly appreciated !</p>
  
  <p>Here are some ressources i tried to follow without success ...</p>
  
  <p><a href="https://devcenter.heroku.com/articles/buildpack-binaries" rel="nofollow">https://devcenter.heroku.com/articles/buildpack-binaries</a></p>
  
  <p><a href="http://www.ryandaigle.com/a/using-vulcan-to-build-binary-dependencies-on-heroku" rel="nofollow">http://www.ryandaigle.com/a/using-vulcan-to-build-binary-dependencies-on-heroku</a></p>