为什么Guard(rspec)停止在jruby上工作
我无法让警卫在jruby上工作。我已经通过rvm在1.9.3旁边安装了jruby。尝试在1.9.3上运行守卫-工作正常。如何使它在为什么Guard(rspec)停止在jruby上工作,ruby,rspec,jruby,guard,specifications,Ruby,Rspec,Jruby,Guard,Specifications,我无法让警卫在jruby上工作。我已经通过rvm在1.9.3旁边安装了jruby。尝试在1.9.3上运行守卫-工作正常。如何使它在spec或lib中的每次更改时自动运行spec 这是我在运行bundle exec-guard后得到的,同时没有更改任何文件 vagrant@precise64:/vagrant/sample$ bundle exec guard 21:16:46 - INFO - Guard uses TerminalTitle to send notifications. 21:
spec
或lib
中的每次更改时自动运行spec
这是我在运行bundle exec-guard
后得到的,同时没有更改任何文件
vagrant@precise64:/vagrant/sample$ bundle exec guard
21:16:46 - INFO - Guard uses TerminalTitle to send notifications.
21:16:47 - INFO - Guard::RSpec is running
21:16:47 - INFO - Running all specs
...
Finished in 0.025 seconds
3 examples, 0 failures
21:17:20 - INFO - Guard is now watching at '/vagrant/sample'
before_session hook failed: Errno::ENOENT: No such file or directory - /vagrant/sample
org/jruby/RubyFile.java:333:in `initialize'
(see _pry_.hooks.errors to debug)
[1] guard(main)>
再次运行spec的唯一方法是在这里按ENTER键。此外,我也无法确定这个没有这样的文件或目录的来源(它不会在1.9.3MRI上弹出)。我不熟悉警卫的内部结构,也不知道为什么会发生这种情况
我的Guardfile
是标准配置:
guard 'rspec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
和Gemfile
仅包含:
gem 'rspec', '~>2.13.0'
gem 'guard-rspec'
gem 'rb-inotify', '~>0.9'
before\u会话
hook来自,但Guard不使用这种类型的hook(我们仅使用:启动时和评估后):
[1]防护罩(主)>撬钩
=> #
[:默认值,
#]],
:当_开始时=>
[[:装载防护装置,
#]],
:评估后=>
[:恢复可视性,
#]],
:在会话=>[]之后,
:在读取=>[]之后,
:在评估之前=>[]}>
我会提交一个Pry bug并在没有Interactior的情况下运行Guard(Guard-I
),直到修复为止。将它添加到您的Guardfile中
# disable Pry for continious integration
interactor :off
# disable Pry for continious integration
interactor :off