Reputation: 21
I am relatively new to deployment on heroku but after trying out an open source ruby on rails project, I figured out how to install the gems (and dependencies of gems) locally, but heroku gives me a hard time. There are two or three gems in question, for which i had to do the following locally:
sudo apt-get install libxslt-dev libxml2-dev # for nokogiri gem sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui # for capybara gem sudo apt-get install uuid-dev # required for xapian-ruby gem sudo apt-get install libqt4-dev # required for xapian-ruby gem if qt not installed earlier =======**
However, as I guessed heroku isnt smart enough to detect and install these gem dependencies. I looked up and spent some time on things like vulcan and heroku run bash but I dont get it conceptually? I also suspect that installing stuff through bash wont work after dyno restarts. And there is not enough documentation on vulcan to make matters worse. I tried all the steps but its simply too confusing.
What is the best approach for installing the gem environment(the libraries stated above). Any help is really appreciated!!!
Thanks, H
Upvotes: 0
Views: 474
Reputation: 26193
If you're on Rails 3.2, you should be managing your gems using Bundler. Heroku is capable of installing directly from your Gemfile, so long as you're conforming to their best practices.
The libraries you cited will very likely already be available to your deployment on Heroku. All you need to worry about is bundling the correct gems – Heroku will do the rest.
UPDATE:
In order to get these dependencies installed, you'll need to do what Heroku terms hacking a buildpack. Assuming you're on the Cedar stack, you can follow Heroku's own documentation for hacking buildpacks here.
Upvotes: 1