bundle install包括所有依赖项,即使是--without

时间:2012-11-07 09:56:34

标签: dependencies install bundle bundler

我正在尝试在Ubuntu 12.04上安装Redmine 2.1.2,但我遇到了依赖问题。简而言之,我正在运行以下命令:

bundle install --without development test mysql sqlite

bundle会尝试安装所有依赖项,甚至是上面列出的组和那些与我的平台不对应的依赖项(ruby而不是jruby)。

以下是我正在使用的Gemfile的链接:http://www.redmine.org/projects/redmine/repository/entry/tags/2.1.2/Gemfile

生成的Gemfile.lock如下:

GEM
  remote: http://localhost:6789/
  specs:
    actionmailer (3.2.8)
      actionpack (= 3.2.8)
      mail (~> 2.4.4)
    actionpack (3.2.8)
      activemodel (= 3.2.8)
      activesupport (= 3.2.8)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.0)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.1.3)
    activemodel (3.2.8)
      activesupport (= 3.2.8)
      builder (~> 3.0.0)
    activerecord (3.2.8)
      activemodel (= 3.2.8)
      activesupport (= 3.2.8)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.8)
      activemodel (= 3.2.8)
      activesupport (= 3.2.8)
    activesupport (3.2.8)
      i18n (~> 0.6)
      multi_json (~> 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 (>= 3.2.0, < 5.0)
      thor (~> 0.14)
    json (1.7.5)
    mail (2.4.4)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    metaclass (0.0.1)
    mime-types (1.19)
    mocha (0.12.3)
      metaclass (~> 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 (>= 0.4)
    rack-openid (1.3.1)
      rack (>= 1.1.0)
      ruby-openid (>= 2.1.8)
    rack-ssl (1.3.2)
      rack
    rack-test (0.6.2)
      rack (>= 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 (~> 1.0)
      railties (= 3.2.8)
    railties (3.2.8)
      actionpack (= 3.2.8)
      activesupport (= 3.2.8)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (0.9.2.2)
    rdoc (3.12)
      json (~> 1.4)
    rmagick (2.13.1)
    ruby-openid (2.1.8)
    shoulda (2.11.0)
    sprockets (2.1.3)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 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 (>= 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 (~> 1.0.6)
  fastercsv (~> 1.5.0)
  i18n (~> 0.6.0)
  jquery-rails (~> 2.0.2)
  jruby-openssl
  mocha (= 0.12.3)
  mysql
  mysql2 (~> 0.3.11)
  net-ldap (~> 0.3.1)
  pg (>= 0.11.0)
  rack-openid
  rails (= 3.2.8)
  rdoc (>= 2.4.2)
  rmagick (>= 2.0.0)
  ruby-openid (~> 2.1.4)
  shoulda (~> 2.11)
  sqlite3
  test-unit
  yard

.bundle/config文件中,有一个ligne BUNDLE_WITHOUT: development:test:mysql:sqlite

我尝试删除github上的bundler的故障排除页面上显示的.bundleGemfile.lock~/.bundler~/.gems(我不能发表因为我没有10个声誉)但它没有改变任何东西。

我从本地存储库获取宝石,其中我只有我需要的宝石。所以我修改了source中的Gemfile(这就是remote: http://localhost:6789Gemfile.lock的原因。因此,安装失败,因为bundler正在寻找我的服务器上不存在的宝石,而且理论上并不需要宝石。

感谢您的帮助

1 个答案:

答案 0 :(得分:4)

您可能需要为这些群组中的某些宝石添加:require => false