K
K
Kroid2014-11-26 18:29:27
Ruby on Rails
Kroid, 2014-11-26 18:29:27

How to install gems via bundle install in rails in docker?

Trying to run a rail project in a docker container based on ubuntu 14.04.
Some gems (such as nokogiri) are not installed via a simple bundle install:

An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling.

I installed system dependencies for it via apt-get, added NOKOGIRI_USE_SYSTEM_LIBRARIES=1 to the environment, but still it is not installed via the bundle, it requires gem install. I can install it this way, but I want to add a clone of the master branch of the repository in the dockerfile and then install the gems, and I don’t know which gems of which versions will be written in Gemfile.lock, so all hope is bundle install. I run bundler as root.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kroid, 2014-11-27
@Kroid

The logs showed that bundler eats a lot of memory when installing gems that compile ssh libraries. I solved the problem by increasing the swap.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question