Bundler:我每次都必须使用相同的命令行选项吗?
我在使用 Bundler 时遇到了一些问题,并有一段时间停止使用它。现在,我重新开始使用它,这次详细阅读了它,并决定这些是我应该运行的第一个命令:
bundle install --binstubs --path vendor
bundle package
我知道将来对 bundle
的调用会记住该路径,但是现在我已经用新的 gem 更新了 Gemfile,我应该运行...?
bundle install
- Bundler 会发现我已经缓存了其他 gem,并且我希望将可执行文件保存到 bin/。这不起作用(或者,更准确地说, ,不适合这种情况),只需使用bundle install --local
- Bundler 需要知道我想使用缓存的 gem,但会记住其他内容。bundle install
并且它不会重新安装当前的 gem(尽管我已经看到它这样做了,这就是我问的原因)bundle install --local --binstubs
- Bundler不会记得任何东西,我需要提供它。- 我不知道的任何其他组合/命令。
然后,在此之后我需要重新运行 我的实验表明,不需要重新运行 bundle package
吗?bundle package
,缓存会更新为新的宝石。
我确实阅读了文档(以及一些博客,尽管找到最新的博客非常困难),但这对我来说并不清楚。
非常感谢任何帮助。
I had some problems with Bundler and stopped using it for a while. Now, I'm getting back to using it, and read up on it more this time and decided these are the first commands I should run:
bundle install --binstubs --path vendor
bundle package
I know that future calls to bundle
will remember the path, but now I've updated my Gemfile with a new gem, should I run...?
bundle install
- Bundler will work out that I already have the other gems cached, and I want executables to bin/.This doesn't work (or, more precisely, isn't for this situation), just usebundle install --local
- Bundler needs to know I want to use the cached gems but remembers the other stuff.bundle install
and it won't reinstall current gems (although I've seen it do that which is why I asked)bundle install --local --binstubs
- Bundler isn't going to remember anything and I need to provide it.- Any other combination/commands I'm not aware of.
And then, do I need to re-run My experiments show me that re-running bundle package
again after this?bundle package
is not required, the cache is updated with new gems.
I did read the docs, (and a couple of blogs, though finding up-to-date ones is quite difficult) but this isn't clear to me.
Any help is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
某些选项被捆绑程序称为“记住的选项”,并存储在
.bundle/config
中。这些记住的选项不需要一次又一次地输入。根据http://gembundler.com/man/bundle-install.1.html#REMEMBERED-OPTIONS,记住的选项是
--deployment
、--path
,--binstubs
,--without
Certain options are what bundler calls remembered options and are stored in
.bundle/config
. These remembered options don't need to be typed again and again.According to the http://gembundler.com/man/bundle-install.1.html#REMEMBERED-OPTIONS, the remembered options are
--deployment
,--path
,--binstubs
,--without