# Knife upload doesn't

**URL:** <https://discourse.chef.io/t/knife-upload-doesnt/4775>\
**Category:** Chef Infra (archive)\
**Created:** [November 7, 2013, 4:55pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775 "2013-11-07T16:55:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Blaine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jeff_blaine/32/19_2.png) [@Jeff\_Blaine](https://discourse.chef.io/u/Jeff_Blaine)\
**Post date:** [November 7, 2013, 4:55pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775/1 "2013-11-07T16:55:09Z")

</div>

I thought maybe I’d found a bug in 11.4.0, so just waited  
to try it again in 11.8.0. That bought me nothing.

Something is definitely either broken in knife or in my  
understanding of ‘knife upload’

```
vim ../../environments/production.rb

[mycookbook version constraint change in file]

knife upload ../../environments/production.rb

knife environment show production.rb

[OLD data shown, new version constraint not in data]

```

Does anyone have any idea what I am missing here?

‘knife environment from file’ works fine.

---

<div class="post-metadata">

**Author:** ![Seth\_Vargo1](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Seth\_Vargo1](https://discourse.chef.io/u/Seth_Vargo1)\
**Post date:** [November 7, 2013, 5:04pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775/2 "2013-11-07T17:04:19Z")

</div>

Knife upload requires JSON, not Ruby files. It will will likely be expanded to include Ruby files in a future release 🙂

Thanks,  
Seth Vargo  
Solutions Engineer, Opscode  
@sethvargo  
From: Jeff Blaine Jeff Blaine  
Reply: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Date: November 7, 2013 at 8:55:27 AM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] knife upload doesn’t  
I thought maybe I’d found a bug in 11.4.0, so just waited  
to try it again in 11.8.0. That bought me nothing.

Something is definitely either broken in knife or in my  
understanding of ‘knife upload’

vim …/…/environments/production.rb

[mycookbook version constraint change in file]

knife upload …/…/environments/production.rb

knife environment show production.rb

[OLD data shown, new version constraint not in data]

Does anyone have any idea what I am missing here?

‘knife environment from file’ works fine.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Mickle](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jonathan_mickle/32/447_2.png) [@Jonathan\_Mickle](https://discourse.chef.io/u/Jonathan_Mickle)\
**Post date:** [November 7, 2013, 5:07pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775/3 "2013-11-07T17:07:40Z")

</div>

Jeff I have been experiencing this for some time as well... It is definitely a bug in chef 11 and i opened a couple support cases on it. Support told me to upgrade to 11.8.01 and after doing so i haven't had the problem. Although the upgrade wasn't as easy as I thought I had to completely remove chef and then re-run the omnibus package. I think 11.6 was plagued with issues and it didn't want to behave. Try removing chef from your workstation and reinstall it.

Jon

Sent from my iPhone

> On Nov 7, 2013, at 8:55 AM, Jeff Blaine [jblaine@kickflop.net](mailto:jblaine@kickflop.net) wrote:
> 
> I thought maybe I'd found a bug in 11.4.0, so just waited  
> to try it again in 11.8.0. That bought me nothing.
> 
> Something is definitely either broken in knife or in my  
> understanding of 'knife upload'
> 
> vim ../../environments/production.rb
> 
> [mycookbook version constraint change in file]
> 
> knife upload ../../environments/production.rb
> 
> knife environment show production.rb
> 
> [OLD data shown, new version constraint not in data]
> 
> Does anyone have any idea what I am missing here?
> 
> 'knife environment from file' works fine.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Mickle](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jonathan_mickle/32/447_2.png) [@Jonathan\_Mickle](https://discourse.chef.io/u/Jonathan_Mickle)\
**Post date:** [November 7, 2013, 5:08pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775/4 "2013-11-07T17:08:21Z")

</div>

Seth I am able to reproduce this on json files in my environment

Sent from my iPhone

> On Nov 7, 2013, at 9:04 AM, Seth Vargo [sethvargo@opscode.com](mailto:sethvargo@opscode.com) wrote:
> 
> Knife upload requires JSON, not Ruby files. It will will likely be expanded to include Ruby files in a future release 🙂
> 
> Thanks,  
> Seth Vargo  
> Solutions Engineer, Opscode  
> @sethvargo  
> From: Jeff Blaine Jeff Blaine  
> Reply: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> Date: November 7, 2013 at 8:55:27 AM  
> To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> Subject: [chef] knife upload doesn't
> 
> > I thought maybe I'd found a bug in 11.4.0, so just waited  
> > to try it again in 11.8.0. That bought me nothing.
> > 
> > Something is definitely either broken in knife or in my  
> > understanding of 'knife upload'
> > 
> > vim ../../environments/production.rb
> > 
> > [mycookbook version constraint change in file]
> > 
> > knife upload ../../environments/production.rb
> > 
> > knife environment show production.rb
> > 
> > [OLD data shown, new version constraint not in data]
> > 
> > Does anyone have any idea what I am missing here?
> > 
> > 'knife environment from file' works fine.

---

<div class="post-metadata">

**Author:** ![John\_Keiser3](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/john_keiser3/32/428_2.png) [@John\_Keiser3](https://discourse.chef.io/u/John_Keiser3)\
**Post date:** [November 7, 2013, 5:57pm UTC](https://discourse.chef.io/t/knife-upload-doesnt/4775/5 "2013-11-07T17:57:36Z")

</div>

Can you give me a little info about the repro? Like, what directory are  
you in (cwd), what is the filename you want to upload, what is your  
configuration, what precise command do you type, and what happens when you  
type it? JSON is uploading for me in 11.8, but it could be I'm using it  
weird 🙂

On Thu, Nov 7, 2013 at 9:08 AM, Jonathan Mickle [jmickle05@gmail.com](mailto:jmickle05@gmail.com) wrote:

> Seth I am able to reproduce this on json files in my environment
> 
> Sent from my iPhone
> 
> On Nov 7, 2013, at 9:04 AM, Seth Vargo [sethvargo@opscode.com](mailto:sethvargo@opscode.com) wrote:
> 
> Knife upload requires JSON, not Ruby files. It will will likely be  
> expanded to include Ruby files in a future release 🙂
> 
> ## Thanks, Seth Vargo Solutions Engineer, Opscode @sethvargo [https://twitter.com/sethvargo](https://twitter.com/sethvargo)
> 
> From: Jeff Blaine Jeff Blaine [jblaine@kickflop.net](mailto:jblaine@kickflop.net)  
> Reply: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> Date: November 7, 2013 at 8:55:27 AM  
> To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com) [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> Subject: [chef] knife upload doesn't
> 
> I thought maybe I'd found a bug in 11.4.0, so just waited  
> to try it again in 11.8.0. That bought me nothing.
> 
> Something is definitely either broken in knife or in my  
> understanding of 'knife upload'
> 
> vim ../../environments/production.rb
> 
> [mycookbook version constraint change in file]
> 
> knife upload ../../environments/production.rb
> 
> knife environment show production.rb
> 
> [OLD data shown, new version constraint not in data]
> 
> Does anyone have any idea what I am missing here?
> 
> 'knife environment from file' works fine.
