I need to run my application on JRuby in production to run native threads to improve the processing power of my application.
However, when developing, I would prefer not to pay the startup costs of the VM since I don't need the extra processing power to develop the application.
Per Heroku's instructions I am using the ruby '1.9.3', engine: 'jruby', engine_version: '1.7.1'
directive in my Gemfile to alert them I am planning on using JRuby.
Is there a way that I could instruct bundler to only use JRuby when I am running the app in the staging or production environments and otherwise to just run MRI?
Something like:
IF I AM IN PRODUCTION OR STAGING
ruby '1.9.3', engine: 'jruby', engine_version: '1.7.1'
ELSE
ruby '2.0.0', patch_level: 353
END