Jruby 1.7.4 with RoR on Windows

I wanted to share my experience upgrading to Jruby 1.7.4 from Jruby
1.6.7
for our Ruby on Rails 3.1 application that is deployed onto Windows
servers.

Background:

My company has developed a check payment processing solution from using
Ruby on Rails. We host our own instance of the application but the
majority
of the deployments are in-house at various financial institutions. The
requirement for Windows is coming from these in-house deployments. We
experimented with MRI for windows with limited success, eventually
opting
for Jruby for deployment. We started on Jruby 1.5.x about two years ago.

Deployment:

We use warbler to generate a ROOT.war file that gets deployed via Tomcat
running as service on the windows machine. We have 2-5 resque workers
running as services as well on the server, they connect to a native
Windows
redis build (GitHub - microsoftarchive/redis: Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes). Weve considered full
stack deploy solutions (i.e. TorqueBox) but prefer the flexibility of
warbler and really like resque/sidkiq.

We were stuck on 1.6.7 for a year or so as upgrading to 1.7.x cause the
following issues:

Unreliable rake assets:precompile

Odd rails console issues in windows

Gem incompatibilities

We werent thrilled with the speed of 1.6.7, but it was our only option
for
a while. We would get customer complains of slowness often and had to
compensate with more server CPUs.

I would test each 1.7.x with eager anticipation to see if these issues
were
fixed. Im happy to say that 1.7.4 resolved them all (mostly).
*
*

With 1.7.4 we have:

Very reliable rake assets:precompile, its actually faster than 1.6.7

Approx 30% speed increase in rendering HAML templates

Better 1.9.3 compatibility

Windows rails console issues were more of a Windows problem, probably
best explained in my stackoverflow answer:

We had a minor issue with the cocaine + paperclip gems that required us
to
fork paperclip. From what I can tell, $? (current thread variable) is
getting set to nil if you try to execute a system command that does not
exists (i.e. file not found in Windows). I can open an issue for this
soon.

Overall our system is much more responsive now with the average request
time dropping 20% to 30%. Weve deployed to 4 customer sites and the
feedback has been overwhelmingly positive. We are in the process of
migrating from reque to sidekiq now, as sidekiq requires 1.7.x.

Anyway, this deployment scheme has been my world for a while now so if
you
have any questions with on Jruby Windows deployment similar to what I
have
described, feel free to shoot them at me. * A big thanks to the Jruby
contributors for this 1.7.4 release!*

I wish to point out that on your stackoverflow answer, on Windows:
‘Tab completion and arrow keys get fixed by setting :USE_READLINE to
true’
does not solve the issue reported on Jira (
http://jira.codehaus.org/browse/JRUBY-6996)

Now this bug is marked as fixed by moving readline out of jruby.jar, but
no
location of a preliminary gem demonstrating this has been shared yet.

Charles: do you have such location?

ah…

Apparently latest 1.7.5 snapshot of jruby-complete found on
http://ci.jruby.org/snapshots/1.7.x/ has this fixed indeed.

Waiting impatiently for 1.7.5 official release then. Jira 6996 is indeed
fixed

On Fri, May 31, 2013 at 10:30 AM, Christian MICHON <

Guys: thanks for fixing that scroll problem on Windows!

@Doug Hathaway, I have an issue with paperclip & jruby 1.7.4 on windows.
Please let me know how you was able to fix $? (current thread variable)
issue? I have a same problem. Many thanks,

Thank you very much. I still get an error “undefined method
`exitstatus’ for nil:NilClass”. Do you need to define path like
“Paperclip.options[:command_path] = 'C:\Program
Files\ImageMagick-6.8.6-Q16”?

What version of paperclip you have?

Sure, here is a brief gist of the workaround: