elasticsearch/cookbook-elasticsearch — pull request #230 by martinb3 (2014-08-25 14:50:22+00:00)
Title: Ensure a valid ruby exists before using it

If `command -v ruby` doesn't return a valid ruby binary, don't use the JSON parsing parts of the init script that depend on ruby. Also check for the validity of `-rubygems` as a ruby argument, as this works in ruby before 1.9, but after, it's invalid.

Fixes https://github.com/elasticsearch/cookbook-elasticsearch/issues/215.