Chef

Basic Chef Fluency Badge > Setting Up A Chef Server, Workstation, and Bootstrapping a Node

Hi there,

In the second step of this lab: (Server 2 Configured as a Workstation and Connects to the Chef Server) just after installing chefdk, when trying to run the eval command  I'm getting this error:

$ eval "$(chef shell-init bash)"
/opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem chef-dk (>= 0.a) with executable chef (Gem::GemNotFoundException)
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:308:in `activate_bin_path'
from /opt/chefdk/embedded/bin/chef:23:in `<main>'

Has anyone been through this problem?  can anyone give me a hand?
Cheers!

  • post-author-pic
    saniatm14
    08-30-2018

    Hi Adria,


    I spun up the lab and I'm not able to reproduce this. If you run `chef shell-init bash` outside of the eval what do you see?

  • post-author-pic
    Curtis N
    12-02-2018

    I am having the same problem. When I run 'chef shell-init bash' this is what I get


    [cloud_user@ip-10-0-1-159 ~]$ chef shell-init bash

    /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem chef-dk (>= 0.a) with executable chef (Gem::GemNotFoundException)

    from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:308:in `activate_bin_path'

    from /opt/chefdk/embedded/bin/chef:23:in `<main>'

    [cloud_user@ip-10-0-1-159 ~]$


    I followed all the steps in the video to the best of my knowledge. This is my second time attempting the lab, with the same error.

Looking For Team Training?

Learn More