undefined method `match' for #<Array:...> #34

Closed
nilbus opened this Issue Jun 1, 2013 · 2 comments

Comments

Projects
None yet
2 participants
Collaborator

nilbus commented Jun 1, 2013

As noted in #31, I'm getting this error now with the latest release. @ruprict noticed that it happens whenever a watch block returns an Array:

watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }

Error:

16:29:43 - ERROR - Guard::JRubyRSpec failed to achieve its <run_on_changes>, exception was:
> [#] NoMethodError: undefined method `match' for #<Array:0x4816505b>
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:50:in `spec_folder?'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:38:in `should_run_spec_file?'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:30:in `clean'
> [#] org/jruby/RubyArray.java:2395:in `select'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:30:in `clean'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:62:in `clear_spec_files_list_after'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec/inspector.rb:29:in `clean'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/.bundle/jruby/1.8/gems/guard-rspec-2.5.4/lib/guard/rspec.rb:85:in `run_on_changes'
> [#] /vagrant/git/guard-jruby-rspec/lib/guard/jruby-rspec.rb:74:in `run_on_changes'
> [#] org/jruby/RubyKernel.java:2080:in `send'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:99:in `run_supervised_task'
> [#] org/jruby/RubyKernel.java:1183:in `catch'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:97:in `run_supervised_task'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:144:in `run_first_task_found'
> [#] org/jruby/RubyArray.java:1615:in `each'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:142:in `run_first_task_found'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:79:in `run_on_changes'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:175:in `scoped_guards'
> [#] org/jruby/RubyArray.java:1615:in `each'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:173:in `scoped_guards'
> [#] org/jruby/RubyKernel.java:1183:in `catch'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:172:in `scoped_guards'
> [#] org/jruby/RubyArray.java:1615:in `each'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:170:in `scoped_guards'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard/runner.rb:72:in `run_on_changes'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard.rb:105:in `setup_listener'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard.rb:368:in `within_preserved_state'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard.rb:365:in `within_preserved_state'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/guard-1.8.0/lib/guard.rb:104:in `setup_listener'
> [#] org/jruby/RubyProc.java:270:in `call'
> [#] org/jruby/RubyProc.java:220:in `call'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/listen-1.0.2/lib/listen/listener.rb:234:in `on_change'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/listen-1.0.2/lib/listen/listener.rb:266:in `initialize_adapter'
> [#] org/jruby/RubyProc.java:270:in `call'
> [#] org/jruby/RubyProc.java:220:in `call'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/listen-1.0.2/lib/listen/adapter.rb:239:in `report_changes'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/listen-1.0.2/lib/listen/adapter.rb:308:in `poll_changed_directories'
> [#] /home/vagrant/ws/rental_express/ROOT/rails/vendor/gems/listen-1.0.2/lib/listen/adapter.rb:284:in `start_poller'
> [#] org/jruby/RubyProc.java:270:in `call'
> [#] org/jruby/RubyProc.java:224:in `call'
16:29:43 - INFO - Guard::JRubyRSpec has just been fired

nilbus was assigned Jun 1, 2013

Owner

jkutner commented Jun 3, 2013

@nilbus does the code in master solve this issue for you?

Collaborator

nilbus commented Jun 3, 2013

Yes it does. I may revisit it later to determine the cause, since it didn't have to be flattened before.

nilbus closed this Jun 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment