Error when running kitchen list in Apply a cookbook locally

Hi,

When I try to execute kitchen list, I get the following error

/opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:461:in 'class_eval': No such file or directory - getcwd (Errno::ENOENT)
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:119:in 'register_klass_file'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:598:in 'method_added'
        from (eval):2:in 'subcommand_help'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:461:in 'class_eval'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:461:in 'subcommand_help'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:229:in 'subcommand'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor.rb:43:in 'register'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/test-kitchen-1.13.2/lib/kitchen/cli.rb:326:in '<class:CLI>'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/test-kitchen-1.13.2/lib/kitchen/cli.rb:30:in '<module:Kitchen>'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/test-kitchen-1.13.2/lib/kitchen/cli.rb:25:in '<top (required)>'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
        from /opt/chefdk/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
        from /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/test-kitchen-1.13.2/bin/kitchen:10:in '<top (required)>'
        from /bin/kitchen:21:in 'load'
        from /bin/kitchen:21:in '<main>'

I’m assuming it has something to do with my config, but since the rest of the tutorials were fine, I do not know where to go from here.

Any help is greatly appreciated.

Thanks in advance!

Check that you aren’t running from a folder that you already deleted.

Thanks for your response.
Unfortunately that did not solve anything (I did not delete anything)

I performed the following steps:
Login to the server
change to the directory with .kitchen.yml
run kitchen list

Same error.

I tried other kitchen commands, but unfortunately to no avail.
All produce the same error :frowning:

Any help is greatly appreciated.

It’s not clear what tutorial you are following or if you’re even in a valid cookbook or have a valid kitchen.yml. I’d suggest joining us in the Community Slack where we can assist further in more real time.

Cheers,
cheeseplus