diff options
author | Thom May <thom@clearairturbulence.org> | 2015-03-24 15:37:39 +0000 |
---|---|---|
committer | Thom May <thom@clearairturbulence.org> | 2015-03-24 15:37:39 +0000 |
commit | c4ec5066313e94368d16a2c37f32973fa75c6191 (patch) | |
tree | e1d0d18987c5fe4582bc91cbb1675b33749db5a1 /lib/chef | |
parent | d45ee988bc5550a912a03a8e05aa3a8ffc115de6 (diff) | |
parent | 9e10455ce2b4a4e29424b7064b1d67a1a25c9d3b (diff) | |
download | chef-c4ec5066313e94368d16a2c37f32973fa75c6191.tar.gz |
Merge pull request #2976 from pburkholder/pdb/gem_warn
Clarify warning
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index ff1e346cd1..d715f42419 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -380,8 +380,13 @@ class Chef # Opscode Omnibus - The ruby that ships inside omnibus is only used for Chef # Default to installing somewhere more functional if new_resource.options && new_resource.options.kind_of?(Hash) - msg = "options should be a string instead of a hash\n" - msg << "in #{new_resource} from #{new_resource.source_line}" + msg = [ + "Gem options must be passed to gem_package as a string instead of a hash when", + "using this installation of Chef because it runs with its own packaged Ruby. A hash", + "may only be used when installing a gem to the same Ruby installation that Chef is", + "running under. See https://docs.chef.io/resource_gem_package.html for more information.", + "Error raised at #{new_resource} from #{new_resource.source_line}", + ].join("\n") raise ArgumentError, msg end gem_location = find_gem_by_path |