Trying to install the gem yields the following:

gem install bundler Fetching: bundler-1.13.6.gem (100%) ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String

The first realization - and it took a lot of time (browsing and reading), is that there are different flavours of Ruby runtimes. Simple Ruby is not enough for Logstash plugin development: it requires a dedicated runtime that runs on the JVM aka JRuby.

The second realization is that while it’s easy to install multiple Ruby runtimes on a machine, it’s impossible to have them run at the same time. While Homebrew makes the jruby package available, it seems there’s only one single gem repository per system and it reacts very poorly to being managed by different runtimes.

After some more browsing, I found the solution: rbenv. It not only mangages ruby itself, but also all associated executables ( gem , irb , rake , etc.) by isolating every runtime. This makes possible to run my Jekyll site with the latest 2.2.3 Ruby runtime and build the plugin with JRuby on my machine. rbenv is available via Homebrew:

This is how it goes:

Install rbenv brew install rbenv Configure the PATH echo 'eval "$(rbenv init -)"' >> ~/.bash_profile Source the bash profile script ~/.bash_profile List all available runtimes rbenv install -l Available versions: 1.8.5-p113 1.8.5-p114 ... ... ... ree-1.8.7-2012.02 topaz-dev Install the desired runtime rbenv install jruby-9.1.6.0 Configure the project to use the desired runtime cd logstash-input-reddit rbenv local jruby-9.1.6.0 Check it’s configured ruby --version jruby-9.1.6.0

Finally, bundler can be installed:

gem install bundler Successfully installed bundler-1.13.6 1 gem installed

And from this point on, all required gems can be installed as well: