【问题标题】:How do you undo bundle install --without你如何撤消捆绑安装 --without
【发布时间】:2012-03-19 04:23:23
【问题描述】:

如何撤消运行

bundle install --without development

现在,我在开发组中有一些 gem 被忽略,因为我运行过一次...(请注意,我尝试删除 gemfile.lock 无济于事)

【问题讨论】:

  • 在此之后它仍然会忽略开发组中的宝石,因为这是一个“记住”的设置...

标签: ruby-on-rails bundler


【解决方案1】:

列出配置

bundle config

从配置中删除值

bundle config --delete without

为配置添加价值

bundle config --local without development

或者您可以手动编辑.bundle/config 文件中的值。

【讨论】:

    【解决方案2】:

    更新后的正确答案是@caspyin,here

    出于历史目的,我的答案仍然在这里:

    Bundler 设置存储在名为.bundle/config 的文件中。你可以 通过删除它或删除整个 .bundle 目录来重置它, 像这样:

    rm -rfv .bundle
    

    或者,如果你害怕rm -rf(没关系,很多人都害怕):

    rm .bundle/config
    rmdir .bundle
    

    【讨论】:

    • 如caspyin所说,你也可以编辑'.bundle/config'文件
    【解决方案3】:

    运行

    bundle install --without ""
    

    参考:https://github.com/carlhuda/bundler/blob/master/spec/install/gems/groups_spec.rb#L149-154

        it "clears without when passed an empty list" do
          bundle :install, :without => "emo"
    
          bundle 'install --without ""'
          should_be_installed "activesupport 2.3.5"
        end
    

    【讨论】:

    • 这似乎不起作用...它似乎还记得我过去指定的内容。不过谢谢!
    • @JonathanLeung 您使用的是哪个版本的捆绑程序?尝试升级?
    【解决方案4】:
    bundle install --no-deployment
    

    【讨论】:

    • 请考虑在您的帖子中添加详细信息,此处不鼓励仅包含代码的帖子。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多