0

我正在尝试使用 Guard 作为Vim在 Linux Shell 中进行测试驱动开发的帮助。为了添加 Guard 依赖,我将其添加到我的.gemspec文件中:

spec.add_development_dependency "guard"

spec.add_development_dependency "guard-rspec"

spec.add_development_dependency "guard-bundler"

然后,在命令行中,我执行了这个:

sudo bin/setup

bundle exec guard init

然后为了更新Bundlegems 和依赖项,我更新了 Bundle 以获取计数 Guard 文件:

sudo bundle install

当我尝试使用 Guard 时bundle exec guard,出现此错误:

/usr/lib/ruby/vendor_ruby/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION
/var/lib/gems/2.6.0/gems/did_you_mean-1.3.1/lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here
/usr/lib/ruby/vendor_ruby/did_you_mean/jaro_winkler.rb:63: warning: already initialized constant DidYouMean::JaroWinkler::WEIGHT
/var/lib/gems/2.6.0/gems/did_you_mean-1.3.1/lib/did_you_mean/jaro_winkler.rb:63: warning: previous definition of WEIGHT was here

对于 Guard 输出此警告:

 Error: Guard will not detect changes to your Gemfile!
> [#] 
> [#]   Solution: move the Gemfile to a watched directory and symlink it back.

我正在guardGithub 的公共存储库中搜索此问题的解决方案,但直到现在我无法修复它。

Ruby我正在使用的版本:ruby 2.6.5

版本guard2.16.1

Bundler版本:2.0.2

在这里你可以看到 Gemfile、Guardfile 和 gemspec

任何帮助将不胜感激,谢谢。

4

0 回答 0