We've moved discussions to Discord

Works on JRuby

It looks like this application runs fine using jruby except for few minor modifications. This is my journal and will keep updating with the steps that I have taken to resolve the issues.

.ruby-version
  • I modified it to jruby-9.2.9

Gemfile
  • Changed ruby version to 2.5.7
  • Made the following changes to the gems
    • gem "pg", platform: :ruby
    • gem "activerecord-jdbcpostgresql-adapter", platform: :jruby
    • gem "oj", "~> 3.8", ">= 3.8.1", platform: :ruby

oj.rb
  • Modified the line to 
Oj.optimize_rails unless RUBY_ENGINE == "jruby"

Knows Issues
  • devise_masquerade gem is causing issues so I commented masqueradable from user.rb for now
Chris Oliver
This is fantastic  A C ! I haven't used JRuby much myself, so thanks for this!

What's the issue with devise_masquerade? I've been looking into maybe replacing it with ankane's pretender gem.
Chris Oliver Here is the error that I am seeing. I did not spend any time on this issue as I am still trying to complete the app and this part of the functionality is not important to me at this point

https://gist.github.com/aroop/155cf6b3a22d30aee484a4ca9329c94e
Chris Oliver This is my first project with jRuby as well as I needed some functionality that is available in few open source java libraries. After evaluating a bunch of choices to integrate ruby with java I went with jRuby. Glad that I took this decision. Everything works perfectly and now I have the whole java ecosystem at my disposal.

Even calling java libraries using ruby syntax is just awesome. In addition to development experience I am excited about the low memory usage once the app is in production. 

One thing that the jRuby team is working on is to improve the startup performance of the jRuby applications which is definitely noticeable while in development. To over come the startup issue I run the app in both MRI and jRuby based on which part of the application that I am currently working on.
Notifications
You’re not receiving notifications from this thread.