title: Chef: Uploading modified cookbook not working?
body: <p>I'm trying to modify and upload a cookbook to my Chef server but when I try that, it looks like the recipe inside the cookbook is not changed in Chef server.</p>
  
  <p>I am using a Win2K8 machine as my workstation, and I edit the learn_chef_iis-0.2.0\recipes\default.rb.  I then do:</p>
  
  <blockquote>
    <p>knife cookbook delete learn_chef_iis</p>
  </blockquote>
  
  <p>then:</p>
  
  <blockquote>
    <p>knife cookbook upload learn_chef_iis</p>
  </blockquote>
  
  <p>and when I look at the default.rb in the opcode web app, it still shows the same default.rb (i.e., my changes are not there).</p>
  
  <p>I've seen some suggestions to change the version of the cookbook and I've tried that by editing the metadata.rb "version", but even when I do that, when I do the "knife cookbook upload" I still end up with the same version (0.2.0) and with the unmodified default.rb.</p>
  
  <p>HELP!!!  I've been working on this for awhile today and am stuck :(!!</p>
  
  <p>Thanks,</p>
  
  <h2>Jim</h2>
  
  <blockquote>
    <p>PS C:\Users\Administrator\chef-repo\learn_chef_iis-0.2.0> knife cookbook upload learn_chef_iis </p>
    
    <p>Uploading learn_chef_iis [0.2.0] </p>
    
    <p>Uploaded 1 cookbook. </p>
    
    <p>PS C:\Users\Administrator\chef-repo\learn_chef_iis-0.2.0> knife cookbook upload learn_chef_iis --force </p>
    
    <p>Uploading learn_chef_iis [0.2.0] </p>
    
    <p>Uploaded 1 cookbook. </p>
    
    <p>PS C:\Users\Administrator\chef-repo\learn_chef_iis-0.2.0></p>
  </blockquote>
  
  <p>EDIT:</p>
  
  <p>Here's the modified default.rb.  Is this ok?  Maybe this default.rb is bad so it causes the "knife upload" to fail?</p>
  
  <pre><code>#
  # Cookbook Name:: learn_chef_iis
  # Recipe:: default
  #
  # Copyright (C) 2014
  #
  #
  #
  powershell_script 'Install IIS' do
    code &lt;&lt;-EOH
    Import-Module ServerManager
    Add-WindowsFeature Web-Server
    EOH
    guard_interpreter :powershell_script
    not_if "(Get-WindowsFeature -Name Web-Server).InstallState -eq 'Installed'"
  end
  
  service 'w3svc' do
    action [:enable, :start]
  end
  
  template 'c:\inetpub\wwwroot\Default.htm' do
    source 'index.html.erb'
  end
  </code></pre>
  
  <p>and, here's a run with "verbose" output:</p>
  
  <pre><code>PS C:\Users\Administrator\chef-repo&gt; knife cookbook upload learn_chef_iis -V
  INFO: Using configuration from C:/Users/Administrator/chef-repo/.chef/knife.rb
  Uploading learn_chef_iis [0.2.0]
  INFO: Validating ruby files
  INFO: Validating templates
  INFO: Syntax OK
  INFO: Saving learn_chef_iis
  INFO: Uploading files
  INFO: Upload complete!
  Uploaded 1 cookbook.
  PS C:\Users\Administrator\chef-repo&gt;
  </code></pre>
  
  <p>EDIT 3:</p>
  
  <p>I don't have an explanation, but I created a new cookbook following:</p>
  
  <p><a href="http://learn.chef.io/learn-the-basics/windows/make-your-recipe-more-manageable/" rel="nofollow">http://learn.chef.io/learn-the-basics/windows/make-your-recipe-more-manageable/</a></p>
  
  <p>This one is named "iis".  </p>
  
  <p>Then I did "knife cookbook upload iis" and that worked, and I did "chef-client -o "recipe[iis]" on the node and that worked.</p>
  
  <p>I then modified the recipe slightly and did the knife upload and chef-client again and saw the updated info on the IIS.</p>
  
  <p>So, the new cookbook seems to be working and updating.</p>
  
  <p>Strange :(???</p>