[chef] Re: Re: Chef-DK-bundled Berkshelf fails: cannot load hashie/hash_extensions


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Chef-DK-bundled Berkshelf fails: cannot load hashie/hash_extensions
  • Date: Wed, 4 Jun 2014 13:08:28 -0700

You should have `/opt/chefdk/bin` in your path before any other omnibus 
locations. For berks, chef, chef-client, knife, and kitchen, we generate 
special executables that lock the versions of dependencies to a known working 
combination.

-- 
Daniel DeLeo


On Wednesday, June 4, 2014 at 1:00 PM, Roman Kushnir wrote:

> tl;dr Update the "berkshelf" gem (`bundle update berkshelf` or `gem install 
> berkshelf -v 3.1.3`).
> 
> There's a chain of dependencies between gems: berkshelf -> ridley -> 
> varia_model -> hashie. And the last dependency wasn't specified precisely 
> enough, so when incompatible version of hashie was released, it broke other 
> gems. This commit from yesteday 
> https://github.com/RiotGames/varia_model/commit/a5e0d677d3e81810844ff95d5164422d6b7b5cf4
>  fixes the version constraint. That should be it.
> 
> 
> 2014-06-04 20:48 GMT+03:00 Phil Mocek 
> <
>  
> (mailto: )>:
> > When I attempt to initialize a cookbook using the Berkshelf
> > installed by Chef DK 0.1.0 on Ubuntu 12.04, it fails as shown
> > below. How should I go about troubleshooting?
> > 
> > $ berks cookbook "$COOKBOOK_NAME" --maintainer="$MY_NAME" \
> > --maintainer-email="$MY_EMAIL_ADDRESS" --no-skip-vagrant \
> > --no-skip-git --no-skip-test-kitchen --foodcritic \
> > --chef-minitest --scmversion --no-no-bundler
> > 
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
> > `require': cannot load such file -- hashie/hash_extensions (LoadError)
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
> > `rescue in require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model/attributes.rb:2:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:6:in
> > `require_relative'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:6:in
> > `<module:VariaModel>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:4:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley/chef_object.rb:1:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:63:in
> > `require_relative'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:63:in
> > `<module:Ridley>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:13:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/lib/berkshelf.rb:6:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/lib/berkshelf/cli.rb:1:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/bin/berks:3:in
> > `<top (required)>'
> > from /opt/chefdk/embedded/bin/berks:23:in `load'
> > from /opt/chefdk/embedded/bin/berks:23:in `<main>'
> > $ which ruby
> > /opt/chefdk/embedded/bin/ruby
> > $ ruby --version
> > ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
> > $ which berks
> > /opt/chefdk/embedded/bin/berks
> > $ berks --version
> > 
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
> > `require': cannot load such file -- hashie/hash_extensions (LoadError)
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
> > `rescue in require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model/attributes.rb:2:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:6:in
> > `require_relative'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:6:in
> > `<module:VariaModel>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/varia_model-0.3.2/lib/varia_model.rb:4:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley/chef_object.rb:1:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:63:in
> > `require_relative'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:63:in
> > `<module:Ridley>'
> > from
> > /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-3.1.0/lib/ridley.rb:13:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/lib/berkshelf.rb:6:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/lib/berkshelf/cli.rb:1:in
> > `<top (required)>'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in
> > `require'
> > from
> > /home/pmocek/.chefdk/gem/ruby/2.1.0/gems/berkshelf-3.1.2/bin/berks:3:in
> > `<top (required)>'
> > from /opt/chefdk/embedded/bin/berks:23:in `load'
> > from /opt/chefdk/embedded/bin/berks:23:in `<main>'
> > $ echo $PATH
> > 
> > /opt/chefdk/embedded/bin:/home/pmocek/.chefdk/gem/ruby/2.1.0/bin:/home/pmocek/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> > 
> > --
> > Phil Mocek
> > https://mocek.org
> 






Archive powered by MHonArc 2.6.16.

§