Rails & docker - can't install json gem
<p>I tried to use <code>panamax-ui</code> (a RoR application) on docker.
I worked on it couples of days (local and docker), modified it with success etc.</p>

<p>Then I've added some new fonctionnalities and some gems.</p>

<p>I've <code>bundle install</code> everything.</p>

<p>Then I wanted to re-build my docker (<code>docker build</code>)</p>

<p>but I've go this error :</p>

<blockquote>
  <p>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.</p>
  
  <p>/usr/bin/ruby extconf.rb creating Makefile</p>
  
  <p>make "DESTDIR=" clean sh: make: not found</p>
  
  <p>make "DESTDIR=" sh: make: not found</p>
  
  <p>make failed, exit code 127</p>
  
  <p>Gem files will remain installed in
  /usr/lib/ruby/gems/2.1.0/gems/json-1.8.3 for inspection. Results
  logged to
  /usr/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/json-1.8.3/gem_make.out
  An error occurred while installing json (1.8.3), and Bundler cannot
  continue. Make sure that <code>gem install json -v '1.8.3'</code> succeeds before
  bundling. The command '/bin/sh -c bundle install --without development
  test' returned a non-zero code: 5</p>
</blockquote>

<p>I tried to remove the Gemfile.lock and re-run <code>bundle install</code> then rebuild the docker, same error...</p>

<p>this is my <strong>Gemfile</strong> :</p>

<pre><code>source 'https://rubygems.org'

gem 'rails', '4.1.7'
gem 'puma', '2.8.2'
gem 'sqlite3', '1.3.9'
gem 'faraday_middleware', '0.9.0'
gem 'docker-api', '1.13.0', require: 'docker'
gem 'fleet-api', '1.1.0', require: 'fleet'
gem 'active_model_serializers', '0.9.0'
gem 'octokit', '3.2.0'
gem 'kmts', '2.0.1'
gem 'devise'
gem "devise_ldap_authenticatable"
gem 'json', '1.8.3'


group :test, :development do
  gem 'rspec-rails'
  gem 'its'
end

group :test do
  gem 'coveralls', '0.7.0'
  gem 'shoulda-matchers', '2.6.1'
  gem 'database_cleaner', '1.3.0'
  gem 'webmock', '1.20.0'
end
</code></pre>

<p>and my <strong>Gemfile.lock</strong></p>

<pre><code>    GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.7)
      actionpack (= 4.1.7)
      actionview (= 4.1.7)
      mail (~&gt; 2.5, &gt;= 2.5.4)
    actionpack (4.1.7)
      actionview (= 4.1.7)
      activesupport (= 4.1.7)
      rack (~&gt; 1.5.2)
      rack-test (~&gt; 0.6.2)
    actionview (4.1.7)
      activesupport (= 4.1.7)
      builder (~&gt; 3.1)
      erubis (~&gt; 2.7.0)
    active_model_serializers (0.9.0)
      activemodel (&gt;= 3.2)
    activemodel (4.1.7)
      activesupport (= 4.1.7)
      builder (~&gt; 3.1)
    activerecord (4.1.7)
      activemodel (= 4.1.7)
      activesupport (= 4.1.7)
      arel (~&gt; 5.0.0)
    activesupport (4.1.7)
      i18n (~&gt; 0.6, &gt;= 0.6.9)
      json (~&gt; 1.7, &gt;= 1.7.7)
      minitest (~&gt; 5.1)
      thread_safe (~&gt; 0.1)
      tzinfo (~&gt; 1.1)
    addressable (2.3.8)
    archive-tar-minitar (0.5.2)
    arel (5.0.1.20140414130214)
    bcrypt (3.1.11)
    builder (3.2.2)
    concurrent-ruby (1.0.2)
    coveralls (0.7.0)
      multi_json (~&gt; 1.3)
      rest-client
      simplecov (&gt;= 0.7)
      term-ansicolor
      thor
    crack (0.4.3)
      safe_yaml (~&gt; 1.0.0)
    database_cleaner (1.3.0)
    devise (4.2.0)
      bcrypt (~&gt; 3.0)
      orm_adapter (~&gt; 0.1)
      railties (&gt;= 4.1.0, &lt; 5.1)
      responders
      warden (~&gt; 1.2.3)
    devise_ldap_authenticatable (0.8.5)
      devise (&gt;= 3.4.1)
      net-ldap (&gt;= 0.6.0, &lt;= 0.11)
    diff-lcs (1.2.5)
    docile (1.1.5)
    docker-api (1.13.0)
      archive-tar-minitar
      excon (&gt;= 0.37.0)
      json
    domain_name (0.5.20160615)
      unf (&gt;= 0.0.5, &lt; 1.0.0)
    erubis (2.7.0)
    excon (0.50.1)
    faraday (0.8.11)
      multipart-post (~&gt; 1.2.0)
    faraday_middleware (0.9.0)
      faraday (&gt;= 0.7.4, &lt; 0.9)
    fleet-api (1.1.0)
      excon (&gt;= 0.27.4)
    http-cookie (1.0.2)
      domain_name (~&gt; 0.5)
    i18n (0.7.0)
    its (0.2.0)
      rspec-core
    json (1.8.3)
    kmts (2.0.1)
    mail (2.6.4)
      mime-types (&gt;= 1.16, &lt; 4)
    mime-types (3.1)
      mime-types-data (~&gt; 3.2015)
    mime-types-data (3.2016.0521)
    minitest (5.9.0)
    multi_json (1.12.1)
    multipart-post (1.2.0)
    net-ldap (0.11)
    netrc (0.11.0)
    octokit (3.2.0)
      sawyer (~&gt; 0.5.3)
    orm_adapter (0.5.0)
    puma (2.8.2)
      rack (&gt;= 1.1, &lt; 2.0)
    rack (1.5.5)
    rack-test (0.6.3)
      rack (&gt;= 1.0)
    rails (4.1.7)
      actionmailer (= 4.1.7)
      actionpack (= 4.1.7)
      actionview (= 4.1.7)
      activemodel (= 4.1.7)
      activerecord (= 4.1.7)
      activesupport (= 4.1.7)
      bundler (&gt;= 1.3.0, &lt; 2.0)
      railties (= 4.1.7)
      sprockets-rails (~&gt; 2.0)
    railties (4.1.7)
      actionpack (= 4.1.7)
      activesupport (= 4.1.7)
      rake (&gt;= 0.8.7)
      thor (&gt;= 0.18.1, &lt; 2.0)
    rake (11.2.2)
    responders (1.1.2)
      railties (&gt;= 3.2, &lt; 4.2)
    rest-client (2.0.0)
      http-cookie (&gt;= 1.0.2, &lt; 2.0)
      mime-types (&gt;= 1.16, &lt; 4.0)
      netrc (~&gt; 0.8)
    rspec-core (3.5.1)
      rspec-support (~&gt; 3.5.0)
    rspec-expectations (3.5.0)
      diff-lcs (&gt;= 1.2.0, &lt; 2.0)
      rspec-support (~&gt; 3.5.0)
    rspec-mocks (3.5.0)
      diff-lcs (&gt;= 1.2.0, &lt; 2.0)
      rspec-support (~&gt; 3.5.0)
    rspec-rails (3.5.0)
      actionpack (&gt;= 3.0)
      activesupport (&gt;= 3.0)
      railties (&gt;= 3.0)
      rspec-core (~&gt; 3.5.0)
      rspec-expectations (~&gt; 3.5.0)
      rspec-mocks (~&gt; 3.5.0)
      rspec-support (~&gt; 3.5.0)
    rspec-support (3.5.0)
    safe_yaml (1.0.4)
    sawyer (0.5.5)
      addressable (~&gt; 2.3.5)
      faraday (~&gt; 0.8, &lt; 0.10)
    shoulda-matchers (2.6.1)
      activesupport (&gt;= 3.0.0)
    simplecov (0.12.0)
      docile (~&gt; 1.1.0)
      json (&gt;= 1.8, &lt; 3)
      simplecov-html (~&gt; 0.10.0)
    simplecov-html (0.10.0)
    sprockets (3.6.3)
      concurrent-ruby (~&gt; 1.0)
      rack (&gt; 1, &lt; 3)
    sprockets-rails (2.3.3)
      actionpack (&gt;= 3.0)
      activesupport (&gt;= 3.0)
      sprockets (&gt;= 2.8, &lt; 4.0)
    sqlite3 (1.3.9)
    term-ansicolor (1.3.2)
      tins (~&gt; 1.0)
    thor (0.19.1)
    thread_safe (0.3.5)
    tins (1.10.2)
    tzinfo (1.2.2)
      thread_safe (~&gt; 0.1)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.2)
    warden (1.2.6)
      rack (&gt;= 1.0)
    webmock (1.20.0)
      addressable (&gt;= 2.3.6)
      crack (&gt;= 0.3.2)

PLATFORMS
  ruby

DEPENDENCIES
  active_model_serializers (= 0.9.0)
  coveralls (= 0.7.0)
  database_cleaner (= 1.3.0)
  devise
  devise_ldap_authenticatable
  docker-api (= 1.13.0)
  faraday_middleware (= 0.9.0)
  fleet-api (= 1.1.0)
  its
  json (= 1.8.3)
  kmts (= 2.0.1)
  octokit (= 3.2.0)
  puma (= 2.8.2)
  rails (= 4.1.7)
  rspec-rails
  shoulda-matchers (= 2.6.1)
  sqlite3 (= 1.3.9)
  webmock (= 1.20.0)

BUNDLED WITH
   1.12.5
</code></pre>

<p><strong>Remember</strong> : The problem is when I do <strong>docker build</strong></p>

<p>thanks for your help</p>