c7rl5q
Last Updated: February 25, 2016
·
601
· Keeguon
7c80f2244b8acb4c58b869215888035b

About jRuby 1.7.5 and Warbler

Hey,

First post around here (among many other I hope). Okay, right to the point, at my work we often have to deploy RoR applications on architectures that mainly uses Java so we're used to rely on jRuby a lot and Warbler to create .WAR files which contains our applications. However, jRuby 1.7.5 was recently released and it was brought to our attention last week that some of our generated .WAR files weren't working anymore on Windows, I haven't checked all platform at this point but I will. Consequently I started investigating and found out that .WAR generated with Warbler using jRuby 1.7.5 are unusable and there are a bunch of issues referenced on GitHub/SO, the main one being this one: https://github.com/jruby/warbler/issues/197.

That said it wouldn't that much of a post without providing a solution. So, first thing I did was to downgrade jRuby to 1.7.4 and regenerated a .WAR like I usually do but I ended up having a similar issue to this one: http://stackoverflow.com/questions/14462959/warbler-seems-to-use-a-different-ffi-that-doesnt-understand-size-t and noticed that the generated .WAR was using jruby-stdlib-1.7.5 instead of jruby-stdlib-1.7.4 which was a bit weird and it took me a while to figure out that if you want you can lock your jRuby jars using the following gem: https://rubygems.org/gems/jruby-jars. So I locked my version at 1.7.4 but then I started having issues with jruby-openssl which was updated along with jRuby so I locked it at version 0.8.8 which was the last version I knew was working with jRuby 1.7.4. To sum everything up I ended up with the following lines in my Gemfile:

gem 'jruby-jars', '1.7.4', :platforms => [:jruby]
gem 'jruby-openssl', '0.8.8', :require => false, :platforms => [:jruby]

Now, all I hope is that we either get a new Warbler and/or jRuby release(s) that will fix everything but in the mean time if you do have to generate .WAR which are supposed to run on Windows this is the only way to go that I know of. Nonetheless, if you find a more elegant way to do it or to make .WAR with the latest version of jRuby please hit me up on Twitter or something because I would be very interested.

Cheers.

Say Thanks
Respond