How can I conditionally choose which stone to use based on the currently used Ruby VM?
Ideally, I would like something like:
if [using jruby] gem 'jruby-openssl'
This will only require jruby-openssl if RVM is used by JRuby.
Trying to answer my own question here.
We can do this using the following Gemfile directive:
if defined?(JRUBY_VERSION) gem 'jdbc-sqlite3' else gem 'sqlite3' end
Use the following in the Gemfile: https://github.com/jruby/activerecord-jdbc-adapter
platforms :ruby do gem 'sqlite3' end platforms :jruby do gem 'jruby-openssl' gem 'activerecord-jdbcsqlite3-adapter' end