On Tuesday, December 4, 2012 at 3:21 AM, Kishore S Kumar wrote:
does anyone get this error while doing a `knife cookbook upload ..`1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:43:in `rescue in block in deep_const_get': can't get const Chef::Sandbox: uninitialized constant Chef::Sandbox (ArgumentError)from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:40:in `block in deep_const_get'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:35:in `each'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:35:in `inject'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:35:in `deep_const_get'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:148:in `parse'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/json-1.6.1/lib/json/common.rb:148:in `parse'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/json_compat.rb:41:in `from_json'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/rest.rb:217:in `block in raw_http_request'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/rest.rb:317:in `retriable_rest_request'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/rest.rb:201:in `raw_http_request'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/rest.rb:195:in `api_request'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/rest.rb:162:in `put'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/cookbook_uploader.rb:99:in `upload_cookbooks'from /Users/kishorek/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/chef-11.0.0.alpha/lib/chef/knife/cookbook_upload.rb:230:in `upload'making the following changes in rest.rb (line 217) fixed it.if response['content-type'] =~ /json/Chef::JSONCompat.from_json(response_body.chomp, create_additions: false)elsebut I'm wondering if there is something else that I should be doing than this fix..
Archive powered by MHonArc 2.6.16.