title: changes in chef cookbook cause cookbook to fail
body: <p>I have encountered a strange issue when trying to run a community cookbook for installing a GitLab server. The cookbook can be found <a href="https://community.opscode.com/cookbooks/gitlab" rel="nofollow">here</a>. I used Berkshelf to install all dependencies and upload ed them to my server using <code>berks upload</code>. </p>
  
  <p>I have to make a change to the <code>gitconfig</code> template in the default templates directory. (I have git use <code>https://</code> instead of <code>git://</code>.) Any time I change a file in the cookbook (even a minor change like adding a comment) I get the following error when trying to run:</p>
  
  <pre><code>[2014-07-28T19:30:50-04:00] ERROR: Exception handlers complete
  [2014-07-28T19:30:50-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
  Chef Client failed. 0 resources updated in 23.330996387 seconds
  [2014-07-28T19:30:50-04:00] ERROR: undefined method `closed?' for nil:NilClass
  [2014-07-28T19:30:50-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
  </code></pre>
  
  <p>the stacktrace below is after making at change in default.rb, I added a comment that said "test"</p>
  
  <p>here is the stacktrace:</p>
  
  <pre><code>Generated at 2014-07-28 19:54:21 -0400
  NoMethodError: undefined method `closed?' for nil:NilClass
  /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2789:in `stream_check'
  /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2709:in `read_body'
  /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2736:in `body'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_inspectors/api_error_formatting.rb:91:in `rescue in format_rest_error'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_inspectors/api_error_formatting.rb:89:in `format_rest_error'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_inspectors/api_error_formatting.rb:77:in `describe_503_error'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb:69:in `humanize_http_exception'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb:47:in `add_explanation'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/error_mapper.rb:64:in `cookbook_sync_failed'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/formatters/base.rb:155:in `cookbook_sync_failed'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/event_dispatch/dispatcher.rb:29:in `block in cookbook_sync_failed'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/event_dispatch/dispatcher.rb:29:in `each'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/event_dispatch/dispatcher.rb:29:in `cookbook_sync_failed'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/cookbook/synchronizer.rb:109:in `rescue in sync_cookbooks'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/cookbook/synchronizer.rb:95:in `sync_cookbooks'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/policy_builder/expand_node_object.rb:179:in `sync_cookbooks'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/policy_builder/expand_node_object.rb:66:in `setup_run_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:265:in `setup_run_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:429:in `do_run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:213:in `block in run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `fork'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:217:in `run_chef_client'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:328:in `block in run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `loop'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:67:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/bin/chef-client:26:in `&lt;top (required)&gt;'
  /usr/bin/chef-client:23:in `load'
  /usr/bin/chef-client:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>If I switch it back and re-upload to my server, the issue goes away. Is there a reason I cannot edit this community cookbook?</p>