title: bundle install includes all dependencies, even with --without
body: <p>I am trying to install <a href="http://www.redmine.org/projects/redmine/wiki/RedmineInstall" rel="nofollow">Redmine 2.1.2</a> on an Ubuntu 12.04, but I have a problem of dependencies. In short, I am running the following command:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>bundle install --without development test mysql sqlite
  </code></pre>
  
  <p>And bundle tries to install all the dependencies, even the one for the groups listed above and the ones not corresponding to my platform (which is <code>ruby</code> and not <code>jruby</code>).</p>
  
  <p>Here is a link to the Gemfile I am using : <a href="http://www.redmine.org/projects/redmine/repository/entry/tags/2.1.2/Gemfile" rel="nofollow">http://www.redmine.org/projects/redmine/repository/entry/tags/2.1.2/Gemfile</a></p>
  
  <p>The generated <code>Gemfile.lock</code> is the following :</p>
  
  <pre class="lang-rb prettyprint-override"><code>GEM
    remote: http://localhost:6789/
    specs:
      actionmailer (3.2.8)
        actionpack (= 3.2.8)
        mail (~&gt; 2.4.4)
      actionpack (3.2.8)
        activemodel (= 3.2.8)
        activesupport (= 3.2.8)
        builder (~&gt; 3.0.0)
        erubis (~&gt; 2.7.0)
        journey (~&gt; 1.0.4)
        rack (~&gt; 1.4.0)
        rack-cache (~&gt; 1.2)
        rack-test (~&gt; 0.6.1)
        sprockets (~&gt; 2.1.3)
      activemodel (3.2.8)
        activesupport (= 3.2.8)
        builder (~&gt; 3.0.0)
      activerecord (3.2.8)
        activemodel (= 3.2.8)
        activesupport (= 3.2.8)
        arel (~&gt; 3.0.2)
        tzinfo (~&gt; 0.3.29)
      activeresource (3.2.8)
        activemodel (= 3.2.8)
        activesupport (= 3.2.8)
      activesupport (3.2.8)
        i18n (~&gt; 0.6)
        multi_json (~&gt; 1.0)
      arel (3.0.2)
      builder (3.0.0)
      coderay (1.0.8)
      erubis (2.7.0)
      fastercsv (1.5.5)
      hike (1.2.1)
      i18n (0.6.1)
      journey (1.0.4)
      jquery-rails (2.0.2)
        railties (&gt;= 3.2.0, &lt; 5.0)
        thor (~&gt; 0.14)
      json (1.7.5)
      mail (2.4.4)
        i18n (&gt;= 0.4.0)
        mime-types (~&gt; 1.16)
        treetop (~&gt; 1.4.8)
      metaclass (0.0.1)
      mime-types (1.19)
      mocha (0.12.3)
        metaclass (~&gt; 0.0.1)
      multi_json (1.3.6)
      mysql (2.8.1)
      mysql2 (0.3.11)
      net-ldap (0.3.1)
      pg (0.14.1)
      polyglot (0.3.3)
      rack (1.4.1)
      rack-cache (1.2)
        rack (&gt;= 0.4)
      rack-openid (1.3.1)
        rack (&gt;= 1.1.0)
        ruby-openid (&gt;= 2.1.8)
      rack-ssl (1.3.2)
        rack
      rack-test (0.6.2)
        rack (&gt;= 1.0)
      rails (3.2.8)
        actionmailer (= 3.2.8)
        actionpack (= 3.2.8)
        activerecord (= 3.2.8)
        activeresource (= 3.2.8)
        activesupport (= 3.2.8)
        bundler (~&gt; 1.0)
        railties (= 3.2.8)
      railties (3.2.8)
        actionpack (= 3.2.8)
        activesupport (= 3.2.8)
        rack-ssl (~&gt; 1.3.2)
        rake (&gt;= 0.8.7)
        rdoc (~&gt; 3.4)
        thor (&gt;= 0.14.6, &lt; 2.0)
      rake (0.9.2.2)
      rdoc (3.12)
        json (~&gt; 1.4)
      rmagick (2.13.1)
      ruby-openid (2.1.8)
      shoulda (2.11.0)
      sprockets (2.1.3)
        hike (~&gt; 1.2)
        rack (~&gt; 1.0)
        tilt (~&gt; 1.1, != 1.3.0)
      sqlite3 (1.3.6)
      test-unit (2.5.2)
      thor (0.16.0)
      tilt (1.3.3)
      treetop (1.4.10)
        polyglot
        polyglot (&gt;= 0.3.1)
      tzinfo (0.3.33)
      yard (0.8.2.1)
  
  PLATFORMS
    ruby
  
  DEPENDENCIES
    activerecord-jdbcmysql-adapter
    activerecord-jdbcpostgresql-adapter
    activerecord-jdbcsqlite3-adapter
    builder (= 3.0.0)
    coderay (~&gt; 1.0.6)
    fastercsv (~&gt; 1.5.0)
    i18n (~&gt; 0.6.0)
    jquery-rails (~&gt; 2.0.2)
    jruby-openssl
    mocha (= 0.12.3)
    mysql
    mysql2 (~&gt; 0.3.11)
    net-ldap (~&gt; 0.3.1)
    pg (&gt;= 0.11.0)
    rack-openid
    rails (= 3.2.8)
    rdoc (&gt;= 2.4.2)
    rmagick (&gt;= 2.0.0)
    ruby-openid (~&gt; 2.1.4)
    shoulda (~&gt; 2.11)
    sqlite3
    test-unit
    yard
  </code></pre>
  
  <p>In the <code>.bundle/config</code> file, there is a ligne <code>BUNDLE_WITHOUT: development:test:mysql:sqlite</code>.</p>
  
  <p>I tried to remove the <code>.bundle</code>, the <code>Gemfile.lock</code>, the <code>~/.bundler</code> and the <code>~/.gems</code> as indicated on the troubleshooting page of bundler on github (which I can't post since I don't have 10 reputations) but it did not change anything.</p>
  
  <p>I am getting the gems from a local repository in which I have only the gems I needed. So I modified the <code>source</code> in the <code>Gemfile</code> (that's why you have a <code>remote: http://localhost:6789</code> in the <code>Gemfile.lock</code>). Because of this, the install fails since bundler is looking for gems that does not exists on my server and that are, theoratically, not needed.</p>
  
  <p>Thank you for your help</p>