加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何告诉bundler忽略不存在的宝石?

发布时间:2020-12-17 03:37:02 所属栏目:百科 来源:网络整理
导读:我的组织有许多内部宝石,用于自动化测试,但不是生产部署所必需的.我正在尝试使用Bundler,因此在我的Gemfile中我将这些宝石包装在: group :test,:development do gem 'dashboard_summary'end 但是,当我跑: $bundle install --without staging development t
我的组织有许多内部宝石,用于自动化测试,但不是生产部署所必需的.我正在尝试使用Bundler,因此在我的Gemfile中我将这些宝石包装在:

group :test,:development do
    gem 'dashboard_summary'
end

但是,当我跑:

$bundle install --without staging development test

我还是得到的

Could not find gem 'dashboard_summary (>= 0) ruby' in the gems available on this machine.

我试图理解为什么Bundler在我告诉它时不会忽视那个宝石.

解决方法

这是预期的行为.从 the docs开始:

While the --without option will skip installing the gems in the specified groups,it will still download those gems and use them to resolve the dependencies of every gem in your Gemfile(5).

虽然最新的Gemfile.lock可能表明不需要再次解析依赖关系,但看起来即使在这种情况下也会下载所有gem.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读