为什么在捆绑器之外运行 Guard 很危险?
当我运行 bundle execguard
时,一切都是干净的,但如果我尝试运行 guard
我得到这个:
WARNING: You are using Guard outside of Bundler, this is dangerous and could not work. Using `bundle exec guard` is safer.
这是为什么?
When I run bundle exec guard
everything is kosher, but if I try to run guard
I get this:
WARNING: You are using Guard outside of Bundler, this is dangerous and could not work. Using `bundle exec guard` is safer.
Why is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自
bundler
官方网站:我不确定是否有任何关于 Guard 的具体信息,但总的来说,通过
bundle exec
运行所有 gems 的可执行文件是一个很好的做法。也许他们只是决定警告开发人员,在没有它的情况下运行guard
可能会导致麻烦(例如,如果您的系统和Gemfile
中有不同版本的guard
)代码>)。From
bundler
official site:I'm not sure whether there is anything specific about
guard
, but in general it's a good practice to run all your gems' executables viabundle exec
. May be they just decided to warn developers that runningguard
without it might cause troubles (e.g. if you have different versions ofguard
in your system and inGemfile
).