-
Notifications
You must be signed in to change notification settings - Fork 85
can't convert Proc into String #285
Comments
Had this same issue hit me. An unfortunate error message. |
@pgddevil @andrewgross what command/code are you running that causes this data to be passed in like this? That's true that it's defined as a proc, but varia_model is smart enough to call that proc under certain situations. I'm having trouble finding the code path to make this happen... |
Hey @sethvargo, here is a rundown of the simplest way to cause the issue for me. Berkshelf 3.1.5 (via ChefDK)
This will trigger the linked stacktrace. At the time I had this issue, I did not have any file at Stacktrace: https://gist.github.com/andrewgross/95cc2fb31b20a9bd59c1 Let me know if you need more info, or you suspect I am mistaken about how I have my environment setup. |
I have the same issue too. @reset Could you please check this out? |
Any progress on this one? Just started facing this one in multiple places (not sure what changed to make it start happening though). Is the code by @pgddevil acceptable? Can we turn it into a PR and get a fix out? |
@matt-richardson I've created a PR to fix this issue in #295 |
Fix #285: Call path proc before expanding
Ruby version: 1.9.3-p547
Ridley version: 4.1.0
gems/ridley-4.1.0/lib/ridley/client.rb:145:in `expand_path': can't convert Proc into String (TypeError)
in client.rb (line 141):
if the :client_key refers to a Proc object, the expand_path call will fail and the error will be can't convert Proc into String.
Would have expect this error:
Ridley::Errors::ClientKeyFileNotFoundOrInvalid client key is invalid or not found at: '/etc/chef/client.pem'
in config.rb (line 50):
we see that a Proc is defined for :client_key
I patched client.rb this way for testing:
The text was updated successfully, but these errors were encountered: