Guard가 jruby에서 작동하지 못하게합니다. 나는 rvm을 통해 1.9.3 옆에 jruby가 inistalled했다. 1.9.3에서 가드를 실행하려고 - 잘 작동합니다. spec
또는 lib
의 모든 변경 사항에 대해 자동으로 사양을 실행하게하려면 어떻게해야합니까? 이것은 내가 bundle exec guard
를 실행 한 후없이 파일을 얻을 것입니다Guard (rspec)가 jruby에서 작동하지 않는 이유
여기 Enter 키를 누릅니다하는 한편
[email protected]:/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 다시 실행 할 수있는 유일한 방법 변경. 또한이 No such file or directory
일의 출처를 확인할 수 없습니다 (1.9.3 MRI에서는 팝업되지 않습니다). 나는 내부 구조에 익숙하지 않아서 왜 그런 일이 일어나는지 알 수 없다. 내 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'