Forum: JRuby spec server with jruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Miika Leppänen (Guest)
on 2009-01-17 11:39
(Received via mailing list)
Hello,

Is it possible to get spec server running with jruby 1.1.6? When I run
spec:server:start rake task (from netbeans) it says:

Starting up spec server.
Loading Rails environment
script/spec_server:81:in `daemonize': fork is unsafe and disabled by
default on JRuby (NotImplementedError)
         from script/spec_server:113

The tests takes more than 5 seconds to startup without spec server and
thats not fun...


- Miika Leppänen
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Thomas E Enebo (Guest)
on 2009-01-18 19:19
(Received via mailing list)
daemonize is written using fork() and that is not supported on JRuby.
We have an experimental flag to turn it on, but it is unlikely ever to
make it past the experiment stage (JVM and fork() are a bad mix).

The only recourse is to try and change daemonize to not use fork
(which would be great) or to perhaps try and dust off our nailgun
server (jruby-ng -- beware this probably will need some sleaves rolled
up).

-Tom

On Sat, Jan 17, 2009 at 3:38 AM, Miika Leppänen 
<removed_email_address@domain.invalid>
wrote:
>
>
>



--
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , 
removed_email_address@domain.invalid

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Miika Leppänen (Guest)
on 2009-01-19 10:16
(Received via mailing list)
Looks like the server starts when run from commandline "jruby script/
spec_server". But when trying to run specs:
"jruby -S spec -X -o spec/spec.opts spec/controllers/controller_spec.rb"

(druby://127.0.0.1:8989) script/spec_server:14:in `run': closed stream
(IOError)
  from (druby://127.0.0.1:8989) /usr/local/jruby/lib/ruby/1.8/drb/
drb.rb:1548:in `perform_without_block'
  from (druby://127.0.0.1:8989) /usr/local/jruby/lib/ruby/1.8/drb/
drb.rb:1508:in `perform'
  from (druby://127.0.0.1:8989) /usr/local/jruby/lib/ruby/1.8/drb/
drb.rb:1582:in `main_loop'
  from (druby://127.0.0.1:8989) :1:in `accept'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/
spec/runner/drb_command_line.rb:13:in `run'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/
spec/runner/option_parser.rb:188:in `parse_drb'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/
spec/runner/option_parser.rb:128:in `order!'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/
spec/runner.rb:59:in `options'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/bin/
spec:4:in `run'
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/bin/
spec:4
  from /usr/local/jruby-trunk/lib/ruby/gems/1.8/gems/rspec-1.1.12/bin/
spec:19:in `load'
  from /usr/local/jruby/bin/spec:19

There was also jira issue about this:
http://jira.codehaus.org/browse/JRUBY-3283

- Miika

On 18.1.2009, at 19.19, Thomas E Enebo wrote:

>
>> script/spec_server:81:in `daemonize': fork is unsafe and disabled
>> ---------------------------------------------------------------------
> Blog: http://www.bloglines.com/blog/ThomasEEnebo
> Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.