# Knife cookbook download no metadata.rb?

**URL:** <https://discourse.chef.io/t/knife-cookbook-download-no-metadata-rb/8225>\
**Category:** Chef Infra (archive)\
**Created:** [April 12, 2016, 11:39pm UTC](https://discourse.chef.io/t/knife-cookbook-download-no-metadata-rb/8225 "2016-04-12T23:39:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SomeoneElse](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@SomeoneElse](https://discourse.chef.io/u/SomeoneElse)\
**Post date:** [April 12, 2016, 11:39pm UTC](https://discourse.chef.io/t/knife-cookbook-download-no-metadata-rb/8225/1 "2016-04-12T23:39:22Z")

</div>

I know that when uploading a chef cookbook the compiled metadata is kept on chef server as metadata.json, but why is it that some cookbooks, when downloaded is missing metadata.rb but instead has a metadata.json inside?

How do I download the metadata.rb from chef server in that case?

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [April 14, 2016, 12:32am UTC](https://discourse.chef.io/t/knife-cookbook-download-no-metadata-rb/8225/2 "2016-04-14T00:32:25Z")

</div>

> [@SomeoneElse](#):
>
> why is it that some cookbooks, when downloaded is missing metadata.rb but instead has a metadata.json inside?

Some tools (berkshelf in particular) do this so that you can use arbitrary ruby code in your `metadata.rb` which might fail when evaluated on a different system. In particular, if you do something like shelling out to git with backticks, you can't evaluate that metadata.rb on a system that doesn't have git installed. I think the `stove` tool also does this when you upload to supermarket.

If you need to transfer cookbooks around with no conversion of metadata, it's probably better to use your source control system if you're using berks.
