Spork not working with JRuby 1.6.2 #123

Open
vitobotta opened this Issue Jun 24, 2011 · 3 comments

Comments

Projects
None yet
3 participants

I am currently making some changes to an existing Rails3 app which must run under JRuby (compilation is needed as it's a self-hosted app for various reasons), and running specs is a pain because loading the environment etc takes too long each time.
So I am trying to use Spork under JRuby 1.6.2 (RVM) as I do with other apps under 1.8/1.9, but I can't get it to work.
At the moment for example I have Ruby Gems 1.8.5 and Spork 0.9.0.rc8; Spork doesn't throw any errors and seems to start correctly, but it seems to get stuck on "Loading Spork.prefork block". Plus, as soon as I run specs, the Drb server cannot be found but Spork does receive something, but then reloads the environment again. I have tried with previous versions of the gem but with the same result. Any idea?

Using RSpec
-- Starting to fill pool...
Wait until at least one slave is provided before running tests...
** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Running tests with args ["--color", "--format", "progress", "spec/lib/dashboard-client_spec.rb"]...
<-- take tuple(2); slave.run...
-- build slave 2...
--> DRb magazine_slave_service: 2 provided...
Preloading Rails environment
Loading Spork.prefork block...

I'm having the same issue, on jruby 1.6.2 and 0.9.0rc7 and rc8

my spork output is the same as yours, my guard rspec output is as follows:

$ guard -g rspec
The signal QUIT is in use by the JVM and will not work correctly on this platform
Guard is now watching at '/home/michael/dev/git4/nfproto'
Guard::RSpec is running, with RSpec 2!
Running all specs
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
  method_missing at /home/michael/.rvm/rubies/jruby-1.6.2/lib/ruby/1.8/drb/drb.rb:1134
             run at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-core-2.6.4/lib/rspec/core/drb_command_line.rb:19
    run_over_drb at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:76
             run at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:63
         autorun at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11
            call at org/jruby/RubyProc.java:268
            call at org/jruby/RubyProc.java:232

Turns out it was an issue with one of my specs. Looks to be working now with jruby 1.6.2.
vitobotta, check your spec window output to see what it could be, try running only one spec with rspec --drb spec and seeing if it works.

nragaz commented Mar 13, 2012

@vitobotta Did you ever resolve this issue? I am having the same problem.

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