Reputation: 3012
Due to Mavericks having some issues with selecting the right C-compiler sometimes when running bundle install
I have to install some of my gems with special flags.
One example of this is I have to run: gem install nokogiri -- --use-system-libraries
.
This is further discussed here: Error to install Nokogiri on OSX 10.9 Maverick?
So my question is: Is there a way to tell bundler to use system libraries when installing nokogiri? Or is there a way to tell gem install
that it should install as "deployment"-gem.
Any other suggestions as how to solve this problem or why I'm having it would be very welcome.
Upvotes: 5
Views: 2996
Reputation: 3012
Solved it by
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install --deployment
Upvotes: 0
Reputation: 84114
You can tell bundler about flags to use when installing gems with
bundle config build.nokogiri --with-system-libraries
This sets this as a global default, ie this setting is stored in ~/.bundle/config. To store it for the current project only, run
bundle config --local build.nokogiri --with-system-libraries
Upvotes: 8