{"action":"created","issue":{"url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/20","labels_url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/20/comments","events_url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/20/events","html_url":"https://github.com/fnichol/chef-ruby_build/issues/20","id":27822211,"number":20,"title":"Including ruby_buil cookbook in the berksfile gives CookBookNotFound","user":{"login":"sompa","id":6455111,"avatar_url":"https://avatars.githubusercontent.com/u/6455111?v=3","gravatar_id":"","url":"https://api.github.com/users/sompa","html_url":"https://github.com/sompa","followers_url":"https://api.github.com/users/sompa/followers","following_url":"https://api.github.com/users/sompa/following{/other_user}","gists_url":"https://api.github.com/users/sompa/gists{/gist_id}","starred_url":"https://api.github.com/users/sompa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sompa/subscriptions","organizations_url":"https://api.github.com/users/sompa/orgs","repos_url":"https://api.github.com/users/sompa/repos","events_url":"https://api.github.com/users/sompa/events{/privacy}","received_events_url":"https://api.github.com/users/sompa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-02-18T19:52:27Z","updated_at":"2015-05-14T19:35:10Z","closed_at":null,"body":"I am including your cookbook in my recipe to install ruby. While the install works wonder, I am having trouble with running tests. I have included 'ruby_build' as a dependency in metadata.rb and hence had to include in Berksfile too. Following is what I have included in my berksfile.\r\n\r\n#####################################\r\nsite :opscode\r\n\r\nmetadata\r\n\r\ncookbook 'ruby_build', git:'https://github.com/fnichol/chef-ruby_build.git', rel:'cookbooks/ruby_build'\r\n#######################################\r\n\r\nI wanted to know if thats the correct way of doing it, as its confusing since cloning the repo gives chef-ruby_build folder name and the metadata of the cookbook says the name to be 'ruby_build'.\r\n\r\nI have also tried it with this \r\ncookbook 'ruby_build', git:'https://github.com/fnichol/chef-ruby_build.git', rel:'chef-ruby_build'\r\nCan you please clarify why was the renaming done and if my approach in specifying in berksfile is correct."},"comment":{"url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/comments/102145847","html_url":"https://github.com/fnichol/chef-ruby_build/issues/20#issuecomment-102145847","issue_url":"https://api.github.com/repos/fnichol/chef-ruby_build/issues/20","id":102145847,"user":{"login":"neurogenesis","id":613023,"avatar_url":"https://avatars.githubusercontent.com/u/613023?v=3","gravatar_id":"","url":"https://api.github.com/users/neurogenesis","html_url":"https://github.com/neurogenesis","followers_url":"https://api.github.com/users/neurogenesis/followers","following_url":"https://api.github.com/users/neurogenesis/following{/other_user}","gists_url":"https://api.github.com/users/neurogenesis/gists{/gist_id}","starred_url":"https://api.github.com/users/neurogenesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neurogenesis/subscriptions","organizations_url":"https://api.github.com/users/neurogenesis/orgs","repos_url":"https://api.github.com/users/neurogenesis/repos","events_url":"https://api.github.com/users/neurogenesis/events{/privacy}","received_events_url":"https://api.github.com/users/neurogenesis/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T19:35:10Z","updated_at":"2015-05-14T19:35:10Z","body":"@sompa for most single-cookbook berkshelf projects, you should omit \"rel:\" entirely. You would use this only for repos where multiple cookbooks are within the same git repo. From berkshelf's website:\r\n\r\n>An optional rel key can be specified if your repository contains many cookbooks in a single repository under a sub-directory or at root.\r\n\r\n```\r\ncookbook \"rightscale\", git: \"https://github.com/rightscale/rightscale_cookbooks.git\", rel: \"cookbooks/rightscale\"\r\n```\r\n\r\nIf you need to specify a particular branch or commit, you may do so in the Berksfile, but it would be better to pin the version in your own cookbook's metadata.rb, like the following:\r\n\r\n[metadata.rb]\r\n```\r\n...\r\ndepends 'ruby_build', 'x.x.x'\r\n```\r\n(where x.x.x = the version you want to pin)\r\n\r\n[Berksfile]\r\n```\r\nsource 'https://supermarket.chef.io'\r\n\r\nmetadata\r\n\r\ncookbook 'ruby_build', git: 'git://github.com/fnichol/chef-ruby_build.git'\r\n...\r\n```"}}