mdxp / knife-backup

knife plugin to help backup and restore a chef server.
Apache License 2.0
110 stars 45 forks source link

add json dep #28

Closed kbruner closed 9 years ago

kbruner commented 10 years ago

knife from chef client versions > 11.12 dies on 'knife backup restore {clients|users}' with the error "Exception: NoMethodError: undefined method `create_id=' for JSON:Module"

chef/json_compat.rb dropped its stdlib dep after 11.12, and its native JSONCompat library doesn't have the create_id method. In chef-client > 11.12, you can drop the create_id and use load() instead of parse(), but that doesn't work in older versions. "require 'json'" seems to be the simplest fix compatible with older and newer clients.

irabinovitch commented 9 years ago

@mdxp any thoughts on merging this?

mdxp commented 9 years ago

Merged! Thanks @kbruner! cc/ @irabinovitch