fgrehm/chef-dokku — pull request #21 by rvalyi (2014-07-11 00:22:19+00:00)
Title: update to Berkshelf 3; fix Vagrant doc

Hello,

the current Gemfile pin Berkshelf to v2.x because of an old Faraday bug that has been fixed since then.
But with Berkshlef 2.x, when doing berks install, you will run into that Bershlef API server error:

rvalyi@rvalyi-laptop:~/DEV/oe8/chef-dokku$ bundle exec berks install -p vendor/cookbooks
Using apt (2.4.0)
/home/rvalyi/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:223:in `open_loop': redirection forbidden: http://cookbooks.opscode.com/api/v1/cookbooks/git/versions/4.0.2/download -> https://s3.amazonaws.com/community-files.opscode.com/cookbook_versions/tarballs/6562/original/git20140423-67736-btf0za.?1398312812 (RuntimeError)
from /home/rvalyi/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:149:in `open_uri'
from /home/rvalyi/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:704:in `open'
from /home/rvalyi/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/open-uri.rb:34:in `open'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/community_rest.rb:173:in `block in stream'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/retryable-1.3.3/lib/retryable.rb:17:in `retryable'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/community_rest.rb:172:in `stream'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/community_rest.rb:99:in `download'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/locations/site_location.rb:44:in `download'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/downloader.rb:119:in `download_location'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/downloader.rb:88:in `block in download'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/downloader.rb:84:in `each'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/downloader.rb:84:in `download'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/resolver.rb:137:in `install_source'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/resolver.rb:57:in `add_source'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/resolver.rb:30:in `block in initialize'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/resolver.rb:29:in `each'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/resolver.rb:29:in `initialize'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:665:in `new'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:665:in `resolve'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/berksfile.rb:418:in `install'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/cli.rb:153:in `install'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/lib/berkshelf/cli.rb:21:in `dispatch'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/gems/berkshelf-2.0.10/bin/berks:6:in `'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/bin/berks:23:in `load'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/bin/berks:23:in `

'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from /home/rvalyi/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `

'

A solution is then to update Berkshelf to v3, which is what this commit does. It also adapts the README accordingly and also mention the installation of the vagrant-cachier that was forgotten but is mandatory.

Hope this helps. Thanks for this project!