You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node['rbenv']['rubies'].eachdo |version|
rbenv_rubyversion# install any gems that we neednode['rbenv']['gems'][version].eachdo |gem|
rbenv_gemgem['name']dooptions''rbenv_versionversionversiongem['version']endendunlessnode['rbenv']['gems'].nil?# Rehash the rbenv environment after all the changesrbenv_rehash'rehash'end
Installs both ruby 2.2.4 and 2.6.0 and sets 2.2.4 to global. Then the tests run and verifies each install using their directories.
Actual Result:
It does not install because it provides the additional options --no-ri and --no-rdoc which exist for 2.2.4 but not 2.6.0
[2019-01-29T21:08:23+00:00] ERROR: ruby_rbenv_gem[bundler] (dk-bamboo::linux-agent line 59) had an error: Mixlib::ShellOut::ShellCommandFailed: gem_package[bundler] (/tmp/kitchen/cache/cookbooks/ruby_rbenv/resources/gem.rb line 42) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/local/rbenv/versions/2.6.0/bin/gem install bundler -q --no-rdoc --no-ri -v "1.17.2" --source=https://www.rubygems.org ----
STDOUT:
STDERR: ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --no-rdoc
---- End output of /usr/local/rbenv/versions/2.6.0/bin/gem install bundler -q --no-rdoc --no-ri -v "1.17.2" --source=https://www.rubygems.org ----
The text was updated successfully, but these errors were encountered:
nitrocode
changed the title
Need to override options to remove --no-rdoc and --no-ri for newer versions of ruby
Need to override options to remove --no-rdoc and --no-ri for newer versions of bundler
Jan 29, 2019
Nevermind. It appears that I'm using an old version of chefdk and its gem_package does not support ruby-2.6.0. I read their release notes that chefdk 14.8 supports installing ruby 2.6.0 gems.
Changing the above from 2.6.0 to 2.5.3 worked correctly.
Cookbook version
2.1.2
Chef-client version
13.8.5
Platform Details
Ubuntu
16.04
Scenario:
Install ruby
2.6.0
Steps to Reproduce:
attributes/agent.rb
recipes/agent.rb
tests/recipes/agent/default_spec.rb
Expected Result:
Installs both ruby
2.2.4
and2.6.0
and sets2.2.4
to global. Then the tests run and verifies each install using their directories.Actual Result:
It does not install because it provides the additional options
--no-ri
and--no-rdoc
which exist for2.2.4
but not2.6.0
The text was updated successfully, but these errors were encountered: