sensu-plugins / sensu-plugin

A framework for writing Sensu plugins & handlers with Ruby.
http://sensuapp.org
MIT License
126 stars 117 forks source link

Support for Ruby < 2.0.0 #148

Closed vpjapp-avoltus closed 8 years ago

vpjapp-avoltus commented 8 years ago

Hello,

I'm having problems installing sensu-plugin with Ruby 1.9.

The commit https://github.com/sensu-plugins/sensu-plugin/commit/229702db7ac98294bd2ae3b2b3195c1ce8f05438 states in the comment that the version of json be pinned to <2.0.0 but the code defines <=2.0.0 which allows for 2.0.0 which does not seem to work with Ruby < 2.0.

In rubygems it's stated that with C-version of json 2.0 depends on Ruby 2.0 while JRuby version does not. Go figure. https://rubygems.org/gems/json/versions/2.0.0 vs https://rubygems.org/gems/json/versions/2.0.0-java

vpjapp-avoltus commented 8 years ago

Just a note to others possibly suffering from this: As a workaround installing json-gem version 1.8.3 before installing sensu-plugin worked at least for me.

cwjohnston commented 8 years ago

Hi @vpjapp-avoltus, thanks for opening this issue. As the commit message states, the intent was to pin at < 2.0.0 and it seems this was overlooked.