[jruby-user] Jruby 1.7.4 with RoR on Windows

37 views
Skip to first unread message

Doug Hathaway

unread,
May 30, 2013, 6:24:29 PM5/30/13
to us...@jruby.codehaus.org

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 (https://github.com/MSOpenTech/redis). We’ve 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 weren’t 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. I’m 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: http://stackoverflow.com/questions/13649437/rails-console-issues-using-jruby-no-prompt-character-no-tab-completion-broken/16678898#16678898  


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%. We’ve 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!


--
Doug Hathaway
dmh....@gmail.com

Christian MICHON

unread,
May 31, 2013, 4:30:43 AM5/31/13
to us...@jruby.codehaus.org, Charles Oliver Nutter
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?
 
--
Christian

Christian MICHON

unread,
May 31, 2013, 4:52:42 AM5/31/13
to us...@jruby.codehaus.org, Charles Oliver Nutter
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
--
Christian

Brian Walsh

unread,
May 31, 2013, 10:53:41 AM5/31/13
to us...@jruby.codehaus.org, Charles Oliver Nutter

Guys: thanks for fixing that scroll problem on Windows!

Tcp IPMEN

unread,
Jul 9, 2013, 1:03:11 PM7/9/13
to us...@jruby.codehaus.org
@Doug Hathaway, I 'm 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,

--
Posted via http://www.ruby-forum.com/.

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

http://xircles.codehaus.org/manage_email


Doug Hathaway

unread,
Jul 9, 2013, 1:18:42 PM7/9/13
to us...@jruby.codehaus.org
Sure, here is a brief gist of the workaround:


--
Doug Hathaway
(407) 680-3631

Tcp IPMEN

unread,
Jul 9, 2013, 1:57:52 PM7/9/13
to us...@jruby.codehaus.org
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?
Reply all
Reply to author
Forward
0 new messages