如何摆脱此警告(永久)
Guard here! It looks like your project has a Gemfile, yet you are running
`guard` outside of Bundler. If this is your intent, feel free to ignore this
message. Otherwise, consider using `bundle exec guard` to ensure your
dependencies are loaded correctly.每次启动bundle exec guard时,...without都必须运行它吗?我曾与更有经验的测试开发人员一起工作过,他们以前设法摆脱了这个警告,但我似乎无法理解它。
发布于 2012-07-19 17:16:53
Guard检查您当前的工作目录是否包含Gemfile,并向您显示要删除的绑定程序警告。添加了这个警告,因为很多问题都是由错误的LOAD_PATH引起的,而使用Bundler运行Guard可以解决大多数问题。
如果你在一个有Gemfile的项目中使用Guard,你应该继续使用Bundler来运行Guard,要么用bundle exec作为Guard的前缀,要么使用一些binstub解决方案。我在我的ZSH config alias be=bundle exec中使用了一个简单的别名,并使用be guard启动了Guard。如果您更喜欢二进制存根解决方案,我建议您使用Rubygems bundler
gem install rubygems-bundler
gem regenerate_binstubs如果您知道自己在做什么,并且不想看到此消息,可以使用--no-bundler-warning (或简短版本的-B)。如果您再也不想看到此消息,请创建一个别名alias guard=guard -B。
https://stackoverflow.com/questions/11551281
复制相似问题