This is in continuation to the post I had previously published Standalone Ruby Project with ActiveRecord.There was an application where we were working on and it needed to scale. So, we moved our application to JRuby tuned it for scalability. Thus wanted to share the information.
Let’s convert our existing ruby application to a JRuby standalone application. Actually to do this there are a few steps, involved. Let’s create a new branch from the standalone ruby project we had created. Lets check out the a new branch.
Setup the environment:
Install the bundler gem.
We need to update the dependencies, we will go to, standalone_app.gemspec adding the following dependencies.
Then add the Ruby Version to the Gemfile. We will just confirm that JRuby is installed correctly.
Lets install our dependencies
If you are creating an application from scratch please refer the Standalone ruby application with ActiveRecord for getting the rake tasks and application tasks working. Please make you remove the
require 'mysql2' from the
standalone_app/lib/standalone_app.rb. Please find the source code on GitHub.
Follow me on Twitter