Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Guard fails with JRuby in 1.9 mode #299

Closed
nolamesa opened this Issue · 12 comments

3 participants

@nolamesa

Hi I believe there is a bug when using guard with JRuby in 1.9 mode. I get the following stacktrace when running bundle exec guard

Guard could not detect any of the supported notification libraries.
Guard is now watching at '/Users/n.diamantopoulos/Documents/Projects/genopedia'
Readline.java:419:in `s_refresh_line': java.lang.NullPointerException
    from Readline$s$0$0$s_refresh_line.gen:65535:in `call'
    from CachingCallSite.java:292:in `cacheAndCall'
    from CachingCallSite.java:135:in `call'
    from CallNoArgNode.java:63:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from IfNode.java:117:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:147:in `call'
    from DefaultMethod.java:183:in `call'
    from CachingCallSite.java:292:in `cacheAndCall'
    from CachingCallSite.java:135:in `call'
    from CallNoArgNode.java:63:in `interpret'
    from IfNode.java:117:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from RescueNode.java:216:in `executeBody'
    from RescueNode.java:120:in `interpretWithJavaExceptions'
    from RescueNode.java:110:in `interpret'
    from BeginNode.java:83:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:111:in `INTERPRET_BLOCK'
    from Interpreted19Block.java:212:in `evalBlockBody'
    from Interpreted19Block.java:163:in `yield'
    from Block.java:130:in `yield'
    from ThreadLibrary.java:224:in `synchronize'
    from ThreadLibrary$Mutex$i$0$0$synchronize.gen:65535:in `call'
    from CachingCallSite.java:302:in `cacheAndCall'
    from CachingCallSite.java:144:in `callBlock'
    from CachingCallSite.java:153:in `callIter'
    from CallNoArgBlockNode.java:64:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:169:in `call'
    from DefaultMethod.java:191:in `call'
    from CachingCallSite.java:302:in `cacheAndCall'
    from CachingCallSite.java:144:in `callBlock'
    from CachingCallSite.java:153:in `callIter'
    from FCallNoArgBlockNode.java:32:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:190:in `call'
    from DefaultMethod.java:199:in `call'
    from CachingCallSite.java:312:in `cacheAndCall'
    from CachingCallSite.java:169:in `call'
    from CallOneArgNode.java:57:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from RescueNode.java:216:in `executeBody'
    from RescueNode.java:120:in `interpretWithJavaExceptions'
    from RescueNode.java:110:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:169:in `call'
    from DefaultMethod.java:191:in `call'
    from RubyClass.java:552:in `finvoke'
    from RubyBasicObject.java:1698:in `send19'
    from RubyKernel.java:2097:in `send19'
    from RubyKernel$s$send19.gen:65535:in `call'
    from JavaMethod.java:266:in `call'
    from CachingCallSite.java:312:in `cacheAndCall'
    from CachingCallSite.java:169:in `call'
    from CallSpecialArgNode.java:67:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from IfNode.java:117:in `interpret'
    from IfNode.java:119:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from RescueNode.java:216:in `executeBody'
    from RescueNode.java:120:in `interpretWithJavaExceptions'
    from RescueNode.java:110:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:233:in `call'
    from DefaultMethod.java:215:in `call'
    from CachingCallSite.java:332:in `cacheAndCall'
    from CachingCallSite.java:203:in `call'
    from CallSpecialArgNode.java:69:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from IfNode.java:119:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:233:in `call'
    from DefaultMethod.java:215:in `call'
    from CachingCallSite.java:332:in `cacheAndCall'
    from CachingCallSite.java:203:in `call'
    from CallTwoArgNode.java:59:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:120:in `call'
    from InterpretedMethod.java:134:in `call'
    from DefaultMethod.java:174:in `call'
    from CachingCallSite.java:282:in `cacheAndCall'
    from CachingCallSite.java:71:in `call'
    from FCallManyArgsNode.java:60:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from RescueNode.java:216:in `executeBody'
    from RescueNode.java:120:in `interpretWithJavaExceptions'
    from RescueNode.java:110:in `interpret'
    from ASTInterpreter.java:74:in `INTERPRET_METHOD'
    from InterpretedMethod.java:147:in `call'
    from DefaultMethod.java:183:in `call'
    from CachingCallSite.java:292:in `cacheAndCall'
    from CachingCallSite.java:135:in `call'
    from CallNoArgNode.java:63:in `interpret'
    from NewlineNode.java:104:in `interpret'
    from BlockNode.java:71:in `interpret'
    from RootNode.java:129:in `interpret'
    from ASTInterpreter.java:119:in `INTERPRET_ROOT'
    from Ruby.java:724:in `runInterpreter'
    from Ruby.java:2487:in `loadFile'
    from ExternalScript.java:66:in `load'
    from LoadService.java:270:in `load'
    from RubyKernel.java:1076:in `loadCommon'
    from RubyKernel.java:1068:in `load19'
    from RubyKernel$s$0$1$load19.gen:65535:in `call'
    from DynamicMethod.java:211:in `call'
    from DynamicMethod.java:207:in `call'
    from CachingCallSite.java:312:in `cacheAndCall'
    from CachingCallSite.java:169:in `call'
    from /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/bin/guard:19:in `__file__'
    from /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/bin/guard:-1:in `load'
    from Ruby.java:697:in `runScript'
    from Ruby.java:690:in `runScript'
    from Ruby.java:597:in `runNormally'
    from Ruby.java:446:in `runFromMain'
    from Main.java:369:in `doRunFromMain'
    from Main.java:258:in `internalRun'
    from Main.java:224:in `run'
    from Main.java:208:in `run'
    from Main.java:188:in `main'

I tried JRuby 1.6.5, 1.6.6 and 1.6.7 with guard 1.2.2 and 1.2.3. I am running OS X 10.7.4 with java 1.6.0_33. The error disappears if i use JRuby in 1.8 mode (JRUBY_OPTS="--1.8")

@netzpirat
Owner

Looks like JRuby has a bug in 1.9 mode with Readline.refresh_line. There's no param, so the NullPointerException comes from internal Readline state.

You can work around this issue for sure by forcing the simple interactor in your Guardfile:

interactor :simple

It would be interesting to test if JRuby in 1.9 mode supports io/console by adding

gem 'coolline'

to your Gemfile and use the coolline interactor:

interactor :coolline
@nolamesa

Adding interactor :simle did indeed resolve the issue! However there seems to be another issue now:

Running all specs
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:4 warning: already initialized constant GENERIC_CACHE
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:5 warning: already initialized constant GENERICS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:136 warning: already initialized constant JAVA
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:137 warning: already initialized constant MSWIN
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:138 warning: already initialized constant MINGW
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:167 warning: already initialized constant Deprecate
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:10 warning: already initialized constant ORIGINAL_ENV
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:59 warning: already initialized constant WINDOWS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:60 warning: already initialized constant FREEBSD
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:61 warning: already initialized constant NULL
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:4 warning: already initialized constant GENERIC_CACHE
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:5 warning: already initialized constant GENERICS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:136 warning: already initialized constant JAVA
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:137 warning: already initialized constant MSWIN
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:138 warning: already initialized constant MINGW
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:167 warning: already initialized constant Deprecate
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:10 warning: already initialized constant ORIGINAL_ENV
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:59 warning: already initialized constant WINDOWS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:60 warning: already initialized constant FREEBSD
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:61 warning: already initialized constant NULL
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:167 warning: already initialized constant Deprecate
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:4 warning: already initialized constant GENERIC_CACHE
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:5 warning: already initialized constant GENERICS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:136 warning: already initialized constant JAVA
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:137 warning: already initialized constant MSWIN
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:138 warning: already initialized constant MINGW
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:10 warning: already initialized constant ORIGINAL_ENV
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:59 warning: already initialized constant WINDOWS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:60 warning: already initialized constant FREEBSD
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:61 warning: already initialized constant NULL
SystemStackError: stack level too deep
                       each at /Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410
                       each at org/jruby/RubyArray.java:1615
                   __send__ at org/jruby/RubyBasicObject.java:1698
                       each at /Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/forwardable.rb:182
                       each at /Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/specification.rb:409
                        map at org/jruby/RubyEnumerable.java:728
                 find_files at /Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems.rb:480
        discover_extensions at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:4
                     ArJdbc at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:17
                     (root) at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:1
                    require at org/jruby/RubyKernel.java:1042
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
            load_dependency at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
                     (root) at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:2
                    require at org/jruby/RubyKernel.java:1042
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
            load_dependency at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
                     (root) at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc.rb:1
                    require at org/jruby/RubyKernel.java:1042
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
            load_dependency at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
                     (root) at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/mysql.rb:1
                    require at org/jruby/RubyKernel.java:1042
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
            load_dependency at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236
                    require at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251
    resolve_hash_connection at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:48
  resolve_string_connection at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:39
                       spec at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:23
       establish_connection at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:127
                    Railtie at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/railtie.rb:82
              instance_eval at org/jruby/RubyBasicObject.java:1730
               execute_hook at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36
                    on_load at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:26
                       each at org/jruby/RubyArray.java:1615
                    on_load at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:25
                    Railtie at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/railtie.rb:74
              instance_exec at org/jruby/RubyBasicObject.java:1757
                        run at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:30
           run_initializers at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:55
                       each at org/jruby/RubyArray.java:1615
           run_initializers at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:54
                initialize! at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/application.rb:136
                   __send__ at org/jruby/RubyBasicObject.java:1698
                       send at org/jruby/RubyKernel.java:2097
             method_missing at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30
                     (root) at /Users/n.diamantopoulos/Documents/Projects/genopedia/config/environment.rb:5
                    require at org/jruby/RubyKernel.java:1042
                     (root) at /Users/n.diamantopoulos/Documents/Projects/genopedia/config/environment.rb:6
                    require at org/jruby/RubyKernel.java:1042
                     (root) at /Users/n.diamantopoulos/Documents/Projects/genopedia/spec/spec_helper.rb:1
                       load at org/jruby/RubyKernel.java:1068
            load_spec_files at /Users/n.diamantopoulos/Documents/Projects/genopedia/spec/controllers/users_controller_spec.rb:746
                    collect at org/jruby/RubyArray.java:2339
            load_spec_files at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746
                        run at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22
                        run at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69
                    autorun at /Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10
@netzpirat
Owner

Looks like this error is caused from rspec (guard-rspec shells out to the rspec command). Does it run from the command line with rspec?

@nolamesa

It works fine if I run jruby -S rspec. Running just rspec fails. jruby -S bundle exec guard fails too.

@netzpirat
Owner

I'm not sure what the problem is, but I recommend you to check out https://github.com/jkutner/guard-jruby-rspec, which is a new rspec runner for JRuby only.

@nolamesa

I tried this gem already. But I get the same error, I guess because it uses guard.

@netzpirat
Owner

I see in the README that they also set the interactor to :simple, so this error should be gone now since you've switched. I see that guard-rspec and guard-jruby-rspec used different ways of starting RSpec. guard-rspec is shelling out to the rspec binary without drb, whereas guard-jruby-rspec calls the RSpec runner directly.

@nolamesa

I am not sure I understand what is the difference with guard-jruby-rspec. When I use it I still get a similar error:

Running all specs
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:167 warning: already initialized constant Deprecate
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:4 warning: already initialized constant GENERIC_CACHE
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:5 warning: already initialized constant GENERICS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:136 warning: already initialized constant JAVA
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:137 warning: already initialized constant MSWIN
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:138 warning: already initialized constant MINGW
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:10 warning: already initialized constant ORIGINAL_ENV
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:59 warning: already initialized constant WINDOWS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:60 warning: already initialized constant FREEBSD
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:61 warning: already initialized constant NULL
ERROR: Guard::JRubyRSpec failed to achieve its <start>, exception was:
SystemStackError: stack level too deep
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-0.9.9.6-java/lib/pry/cli.rb:34:in `add_plugin_options'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-0.9.9.6-java/lib/pry/cli.rb:71:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-0.9.9.6-java/lib/pry/cli.rb:212:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-0.9.9.6-java/lib/pry.rb:5:in `PryRails'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-rails-0.1.6/lib/pry-rails.rb:3:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/pry-rails-0.1.6/lib/pry-rails.rb:68:in `require'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `require'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/config/application.rb:7:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/config/application.rb:2:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/config/environment.rb:6:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/spec/spec_helper.rb:1:in `(root)'
org/jruby/RubyKernel.java:1068:in `load'
/Users/n.diamantopoulos/Documents/Projects/genopedia/spec/controllers/users_controller_spec.rb:746:in `load_spec_files'
org/jruby/RubyArray.java:2339:in `collect'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-jruby-rspec-0.1.3/lib/guard/jruby-rspec/runner.rb:46:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-rspec-1.1.0/lib/guard/rspec.rb:32:in `run_all'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-jruby-rspec-0.1.3/lib/guard/jruby-rspec.rb:49:in `start'
org/jruby/RubyBasicObject.java:1698:in `__send__'
org/jruby/RubyKernel.java:2097:in `send'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:90:in `run_supervised_task'
org/jruby/RubyKernel.java:1197:in `catch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:88:in `run_supervised_task'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:47:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:161:in `scoped_guards'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:160:in `scoped_guards'
org/jruby/RubyKernel.java:1197:in `catch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:159:in `scoped_guards'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:158:in `scoped_guards'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:46:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:158:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:323:in `within_preserved_state'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:320:in `within_preserved_state'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:157:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/cli.rb:100:in `start'
org/jruby/RubyBasicObject.java:1698:in `__send__'
org/jruby/RubyKernel.java:2097:in `send'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/bin/guard:6:in `(root)'
org/jruby/RubyKernel.java:1068:in `load'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/bin/guard:19:in `(root)'

Guard::JRubyRSpec has just been fired
@netzpirat
Owner

The difference is just the way Rspec is executed, but it seems that it makes no difference. Looks like an issue with a pry plugin, since the stack overflow is thrown in Pry's add_plugin_options.

@nolamesa

I don't think it is pry. I was using pry for debugging. After removing it I get this stack trace (with guard-jruby-rspec):

Running all specs
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_integration.rb:167 warning: already initialized constant Deprecate
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:4 warning: already initialized constant GENERIC_CACHE
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/gem_helpers.rb:5 warning: already initialized constant GENERICS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:136 warning: already initialized constant JAVA
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:137 warning: already initialized constant MSWIN
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler/rubygems_ext.rb:138 warning: already initialized constant MINGW
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:10 warning: already initialized constant ORIGINAL_ENV
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:59 warning: already initialized constant WINDOWS
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:60 warning: already initialized constant FREEBSD
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.4/lib/bundler.rb:61 warning: already initialized constant NULL
ERROR: Guard::JRubyRSpec failed to achieve its <start>, exception was:
SystemStackError: stack level too deep
/Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/specification.rb:410:in `each'
org/jruby/RubyArray.java:1615:in `each'
org/jruby/RubyBasicObject.java:1698:in `__send__'
/Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/specification.rb:409:in `each'
org/jruby/RubyEnumerable.java:728:in `map'
/Users/n.diamantopoulos/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems.rb:480:in `find_files'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:4:in `discover_extensions'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:17:in `ArJdbc'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:1:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc/discover.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc.rb:2:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/jdbc.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/mysql.rb:1:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/arjdbc/mysql.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:1:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-jdbc-adapter-1.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in `resolve_hash_connection'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in `resolve_string_connection'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in `spec'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in `establish_connection'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/railtie.rb:82:in `Railtie'
org/jruby/RubyBasicObject.java:1730:in `instance_eval'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/activerecord-3.2.6/lib/active_record/railtie.rb:74:in `Railtie'
org/jruby/RubyBasicObject.java:1757:in `instance_exec'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `run_initializers'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
org/jruby/RubyBasicObject.java:1698:in `__send__'
org/jruby/RubyKernel.java:2097:in `send'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/n.diamantopoulos/Documents/Projects/genopedia/config/environment.rb:5:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/config/environment.rb:6:in `(root)'
org/jruby/RubyKernel.java:1042:in `require'
/Users/n.diamantopoulos/Documents/Projects/genopedia/spec/spec_helper.rb:1:in `(root)'
org/jruby/RubyKernel.java:1068:in `load'
/Users/n.diamantopoulos/Documents/Projects/genopedia/spec/controllers/users_controller_spec.rb:746:in `load_spec_files'
org/jruby/RubyArray.java:2339:in `collect'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-jruby-rspec-0.1.3/lib/guard/jruby-rspec/runner.rb:46:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-rspec-1.1.0/lib/guard/rspec.rb:32:in `run_all'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-jruby-rspec-0.1.3/lib/guard/jruby-rspec.rb:49:in `start'
org/jruby/RubyBasicObject.java:1698:in `__send__'
org/jruby/RubyKernel.java:2097:in `send'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:90:in `run_supervised_task'
org/jruby/RubyKernel.java:1197:in `catch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:88:in `run_supervised_task'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:47:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:161:in `scoped_guards'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:160:in `scoped_guards'
org/jruby/RubyKernel.java:1197:in `catch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:159:in `scoped_guards'
org/jruby/RubyArray.java:1615:in `each'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:158:in `scoped_guards'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/runner.rb:46:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:158:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:323:in `within_preserved_state'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:320:in `within_preserved_state'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard.rb:157:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/lib/guard/cli.rb:100:in `start'
org/jruby/RubyBasicObject.java:1698:in `__send__'
org/jruby/RubyKernel.java:2097:in `send'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor.rb:275:in `dispatch'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/bin/guard:6:in `(root)'
org/jruby/RubyKernel.java:1068:in `load'
/Users/n.diamantopoulos/.rvm/gems/jruby-1.6.7/gems/guard-1.2.3/bin/guard:19:in `(root)'

Guard::JRubyRSpec has just been fired
@netzpirat
Owner

I think the issue may be related to your configuration/environment and not to Guard. Make sure the specs run fine when running rspec. I'd look into the load process with a debugger and see what it tries to load and look into Ruby's $LOAD_PATH.

@jcf
jcf commented

I was getting the same exception when running guard with JRuby, but found the simple interactor skipped readline and got tests running.

I have noticed file system events don't appear to trigger running specs however, and that RSpec doesn't print in colour regardless of where I add the color switch. I can run tests manually for now.

@netzpirat netzpirat closed this in 9b77cec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.