Chef-DK-bundled Berkshelf fails: cannot load hashie/hash_extensions


#1

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:inrescue 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:inmodule: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:inrequire’
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:inmodule: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:inrequire’
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:inrequire’
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:inrequire’
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
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:inrescue 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:inmodule: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:inrequire’
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:inmodule: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:inrequire’
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:inrequire’
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:inrequire’
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'
$ 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


#2

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 phil-lists@mocek.org:

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
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'
$ 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


#3

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 <phil-lists@mocek.org (mailto:phil-lists@mocek.org)>:

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:inrescue 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:inmodule: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:inrequire’
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:inmodule: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:inrequire’
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:inrequire’
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:inrequire’
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
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:inrescue 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:inmodule: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:inrequire’
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:inmodule: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:inrequire’
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:inrequire’
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:inrequire’
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'
$ 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


#4

Roman Kushnir wrote:

Update the “berkshelf” gem (bundle update berkshelf or gem install berkshelf -v 3.1.3).

Upgrading to Berkshelf 3.1.3 resolved my problem. Thank you.

Daniel DeLeo wrote:

You should have /opt/chefdk/bin in your path before any other
omnibus locations.

Is that documented anywhere? It is not on the ChefDK
introduction, download page, 1.0.1 relase
announcement
, or source code repository README, though
the README does direct users to add /opt/chefdk/embedded/bin and
~/.chefdk/gem/ruby/2.1.0/bin to their PATHs in order to use ChefDK
as one’s primary Ruby/Chef development environment.

References:


Phil Mocek
https://mocek.org


#5

On Wednesday, June 4, 2014 at 2:03 PM, Phil Mocek wrote:

Roman Kushnir wrote:

Update the “berkshelf” gem (bundle update berkshelf or gem install berkshelf -v 3.1.3).

Upgrading to Berkshelf 3.1.3 resolved my problem. Thank you.

Daniel DeLeo wrote:

You should have /opt/chefdk/bin in your path before any other
omnibus locations.

Is that documented anywhere? It is not on the ChefDK
introduction, download page, 1.0.1 relase
announcement
, or source code repository README, though
the README does direct users to add /opt/chefdk/embedded/bin and
~/.chefdk/gem/ruby/2.1.0/bin to their PATHs in order to use ChefDK
as one’s primary Ruby/Chef development environment.

References:


Phil Mocek
https://mocek.org

I just realized it was a problem today when I implemented chef shell-init. https://github.com/opscode/chef-dk/pull/63


Daniel DeLeo