-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Options should be a kind_of String #83
base: master
Are you sure you want to change the base?
Conversation
From the code in https://github.com/opscode/chef/blob/master/lib/chef/provider/package/rubygems.rb If you have a gem_binary specified, you cannot have options as a Hash. If you're using Omnibus, your options should be a string.
I'd love to see this merged. As it is, you can't use the options attribute. If you pass a Hash (as is allowed by this cookbook) it gets shot down by chef, and if you pass a string it is disallowed by this cookbook. |
+1 |
Just tried to debug this options thing. Could it be, that |
It's on the end of that line... "#{gem_binary_path} install #{name} -q --no-rdoc --no-ri #{version_option} #{src}#{opts}" |
@jgeiger Yeah, that's where it is used, but how/where is it defined / passed into the function? |
Likely somewhere higher up the chain. Don't have a lot of time to search but a quick look at shows it's being used inside the method at 531. |
@jgeiger thanks! |
👍 This is biting me as well. I'm in the unfortunate position of being in an environment needing a proxy. There's no |
Until this is fixed, I've been using this hack in my own rbenv wrapper cookbook:
|
+1 |
Yes, this should be merged. I am getting following error:
|
@caleb Does your workaround still work for you in Chef 12.1.0? It seems to work for me in <= 12.0.3 but doesn't in 12.1.0 ... |
From https://github.com/opscode/chef/blob/master/lib/chef/provider/package/rubygems.rb
Line 369-71:
If you have a gem_binary specified, you cannot have options as a Hash.
Line 377-80
If you're using Omnibus, your options should be a String.
Also, there doesn't seem to be any example of how to use options as a hash so it's not clear how to do something like "--force".