Claudiu Creanga
Claudiu Creanga

Reputation: 8366

Tell gem to use existing libraries inside Gemfile.lock

Nokogiri can be installed on my server only with --use-system-libraries. Otherwise it will fail because of libxml2 incompatibilities.

I want to run bundle install through a command like railshoster deploy which includes several things, including bundle install.

But it gives errors when installing nokogiri. Is there a way to mention in Gemfile.lock that for Nokogiri it has to use existing libraries?

What is the right syntax inside Gemfile.lock? gem nokogiri -- --use-system-libraries does not work.

Thanks!

Upvotes: 2

Views: 418

Answers (1)

Gergo Erdosi
Gergo Erdosi

Reputation: 42043

You can use an environment variable:

NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install

Upvotes: 4

Related Questions