locomote/gusteau — pull request #34 by ctaintor (2013-08-06 06:39:03+00:00)
Title: Switch Omnibus script to use rubygems to determine currently installed Chef version

My main reason for wanting to change this is because we use the RVM cookbook and set the system default ruby to be one installed by RVM. This means that if we run Chef twice on a node, then we have to actually bootstrap Chef both times since RVM won't have Chef in its default gems.

The old way of checking for chef failed because there would be a chef-solo at /usr/bin but it would be unusable since it would expect the Chef gem to also be installed. Using rubygems to check the version solves this problem.