Porting to JRuby

Before deploying any existing MRI-based Rails application on JRuby, you must make a few essential changes to its dependencies. To ensure that you keep track of your changes, initialize a Git repository and create a branch with the following commands:

 $ ​​cd​​ ​​~/code/twitalytics
 $ ​​git​​ ​​init
 $ ​​git​​ ​​add​​ ​​-A
 $ ​​git​​ ​​commit​​ ​​-m​​ ​​"initial commit"
 $ ​​git​​ ​​checkout​​ ​​-b​​ ​​jruby
 Switched to a new branch 'jruby'

In the past, preparing an app for JRuby required a number of library and code changes because many gems and commands such as Kerenel#exec couldn’t be used reliably. But today, JRuby 9k uses native operations for most I/O and process APIs. This makes it the only POSIX-friendly ...

Get Deploying with JRuby 9k now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.