3

I know that I can run JRuby with 1.9 compatibility with the --1.9 flag. No problems here.

However, I cannot get Rails3 to run with JRuby 1.6.2 in 1.9 mode on Windows XP. Am I missing something?

Here are my JRuby 1.6.2 version details:

C:\DEV\Jruby\jrails\foobar>jruby -v
jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-26 1.6.2) (Java HotSpot(TM) Client VM 1.6.0_23) [Windows XP-x86-java]

And here's the output when starting up Rails3 with JRuby and the --1.9 flag on:

C:\DEV\Jruby\jrails\foobar>jruby --1.9 -S rails s
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-05-27 00:16:34] INFO  WEBrick 1.3.1
[2011-05-27 00:16:34] INFO  ruby 1.8.7 (2011-05-27) [java]
[2011-05-27 00:16:34] INFO  WEBrick::HTTPServer#start: pid=7160 port=3000

As you can see, Rails3 starts up with ruby 1.8.7.

By the way, I have no problems running Rails3 with JRuby 1.6.2 in 1.9 compatibility mode on FreeBSD, and I reckon it might be OK on Linux as well. Just can't get it to work on Windows.

Could someone tell me why I can't run Rails3 with JRuby 1.6.2 in 1.9 mode?

buruzaemon
  • 3,847
  • 1
  • 23
  • 44

1 Answers1

2

Bug report JRUBY-5818 reports that Rails started with JRuby in 1.9 mode on Windows will restart in 1.8 mode. This is exactly the problem I am facing. Hope this gets fixed soon.

UPDATE The JRuby team report that Rails does not recognize command-line arguments when it respawns. The solution is to set 1.9 mode in JRUBY_OPTS or .jrubyc.

buruzaemon
  • 3,847
  • 1
  • 23
  • 44
  • Have you gotten this fixed? I'm having the same problem. – Lieven Cardoen Mar 05 '12 at 09:35
  • @LievenCardoen I read on the JRuby bug report above (last updated 17-Jan) that Rails does not recognize any of the command-line arguments as it respawns, but it is possible to start up JRuby/Rails in 1.9 mode by using either `JRUBY_OPTS` or `.jrubyc`. – buruzaemon Mar 05 '12 at 21:06