electric-it / minimart

MiniMart RubyGem for Chef cookbook mirroring and storage.
Apache License 2.0
52 stars 20 forks source link

berks install issues? #13

Closed lcc2207 closed 9 years ago

lcc2207 commented 9 years ago

Im running into issues running a berks install against our minimart server. As of today its configured for http and I get the following error

Resolving cookbook dependencies... Fetching 'testme' from source at . Fetching cookbook index from http://xxxxxxx... /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-api-client-1.2.1/lib/berkshelf/api_client/connection.rb:67:in block in universe': undefined methodeach' for #String:0x000000013dafa8 (NoMethodError) from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-api-client-1.2.1/lib/berkshelf/api_client/connection.rb:66:in tap' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-api-client-1.2.1/lib/berkshelf/api_client/connection.rb:66:inuniverse' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-3.2.3/lib/berkshelf/source.rb:22:in build_universe' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/berkshelf-3.2.3/lib/berkshelf/installer.rb:21:inblock (2 levels) in build_universe'

richardardrichard commented 9 years ago

Is your server set up to return a content type of application/json from the universe endpoint? Is the /universe endpoint returning JSON of the structure { "cookbook_name" : { "version": {} } }

lcc2207 commented 9 years ago

Yes I can wget http://xxx/universe and get a larger json file

richardardrichard commented 9 years ago

Does the JSON file fit the description I specified above? Is the content type header of the response set to application/json? If it isn't set to application/json Berkshelf will not work. There are instructions in the README on how to set this up on nginx, apache, and amazon s3.

lcc2207 commented 9 years ago

that was the issue. I had missed adding that to my site.