【问题标题】:How does Bundler utilize Gemfile.lock to load gems?Bundler 如何利用 Gemfile.lock 加载 gem?
【发布时间】:2012-04-15 14:33:48
【问题描述】:

目前我对 bundler 如何处理文件 Gemfile 和 Gemfile.lock 有点困惑。

在我的 Gemfile 中,我有以下内容

group :development do
  gem 'ruby-debug19', :require => 'ruby-debug'
end

在生产中,我运行bundle install --without development。但是,在 Gemfile.lock 中,'ruby-debug19' 仍然列在文件底部的 DEPENDENCIES 下,并且 gem 及其所需的内容列在上面的主要列表中。

那么 --without 选项到底在做什么呢?我没有在生产环境中安装 ruby​​-debug19 所需的 gem,因为它是生产环境。

我是 Rails 的新手,我正在使用 v3.2

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 rubygems bundler


    【解决方案1】:

    查看Bundler FAQ。您的问题似乎已在FAQs

    中得到解答

    FAQ: Why Is Bundler Downloading Gems From --without Groups?

    【讨论】:

      猜你喜欢
      • 2012-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-28
      • 2016-05-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多