Prepping your Gemfile for Rubinius
Rubinius 2.0 is on it’s way and it’s shaping up to be a serious contender. Adding support for Rubinius to your gem should be pretty painless.
Here at [i] it’s common for us to depend on support utilities like ruby-debug or perftools. Fortunately Rubinius comes with a very solid debugger and profiler. The best solution I’ve found is to use Bundler’s :platform rules to limit those libraries to Matz’s ruby.
In your Gemfile:
gem 'ruby-debug', :platform => :mri_18 gem 'ruby-debug19', :platform => :mri_19, :require => 'ruby-debug' gem 'perftools.rb', :platform => :mri, :require => 'perftools'
And then inside your spec helper or test helper use bundler to only require the dependencies you need for that platform:
require 'bundler/setup' Bundler.require(:default, :development)
And that’s it.