RiotGames/rbenv-cookbook — pull request #29 by neilschelly (2013-03-27 14:38:21+00:00)
Title: gem install functionality fix

`gem install` commands don't support blank strings for the -v option. I've
included below the error output I received from invoking this to install
a gem, and how it failed since it included '-v ""' in the install command. This patch
will ensure that the -v option is stripped out, unless a version is explicitly set.
-N

Using this provider as follows:
rbenv_gem "bundler" do
ruby_version "1.9.3-p194"
end

Yielded the following install command:
Expected process to exit with [0], but received '1'
---- Begin output of /opt/rbenv/versions/1.9.3-p194/bin/gem install bundler -q --no-rdoc --no-ri -v "" ----
STDOUT:
STDERR: ERROR: While executing gem ... (ArgumentError)
Illformed requirement [""]
---- End output of /opt/rbenv/versions/1.9.3-p194/bin/gem install bundler -q --no-rdoc --no-ri -v "" ----
Ran /opt/rbenv/versions/1.9.3-p194/bin/gem install bundler -q --no-rdoc --no-ri -v "" returned 1