# Knife error uninitialized constant Chef::Knife::Ssh (NameError)

**URL:** <https://discourse.chef.io/t/knife-error-uninitialized-constant-chef-knife-ssh-nameerror/2893>\
**Category:** Chef Infra (archive)\
**Created:** [June 30, 2012, 4:04pm UTC](https://discourse.chef.io/t/knife-error-uninitialized-constant-chef-knife-ssh-nameerror/2893 "2012-06-30T16:04:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Montgomery](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@David\_Montgomery](https://discourse.chef.io/u/David_Montgomery)\
**Post date:** [June 30, 2012, 4:04pm UTC](https://discourse.chef.io/t/knife-error-uninitialized-constant-chef-knife-ssh-nameerror/2893/1 "2012-06-30T16:04:05Z")

</div>

Hi

For any knife command I am using, I am getting the below error. If I  
repeat the command 3-4 times it will then work. I noticed after I ran  
gem update fog

So, knife is now useless in a production env. How do I resolve?  
Again, this is for any knife command, not specific to the command I  
used below.

knife cloudstack server create ‘role[nginx\_server]’ …

/usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:33:  
uninitialized constant Chef:🔪:Ssh (NameError)  
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:204:in `call' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:204:in`load\_deps’  
from /usr/lib/ruby/gems/1.8/gems/knife-cloudstack-fog-0.2.10/lib/chef/knife/cloudstack\_server\_create.rb:19  
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand\_loader.rb:37:in  
`load' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand_loader.rb:37:in`load\_commands’  
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand\_loader.rb:37:in  
`each' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand_loader.rb:37:in`load\_commands’  
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:114:in  
`load_commands' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:162:in`run’  
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/application/knife.rb:123:in  
`run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/knife:25 from /usr/bin/knife:19:in`load’  
from /usr/bin/knife:19

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [July 2, 2012, 3:49pm UTC](https://discourse.chef.io/t/knife-error-uninitialized-constant-chef-knife-ssh-nameerror/2893/2 "2012-07-02T15:49:47Z")

</div>

On Saturday, June 30, 2012 at 9:04 AM, David Montgomery wrote:

> Hi
> 
> For any knife command I am using, I am getting the below error. If I  
> repeat the command 3-4 times it will then work. I noticed after I ran  
> gem update fog
> 
> So, knife is now useless in a production env. How do I resolve?  
> Again, this is for any knife command, not specific to the command I  
> used below.
> 
> knife cloudstack server create 'role[nginx\_server]' .........
> 
> /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/bootstrap.rb:33:  
> uninitialized constant Chef:🔪:Ssh (NameError)  
> from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:204:in `call' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:204:in `load\_deps'  
> from /usr/lib/ruby/gems/1.8/gems/knife-cloudstack-fog-0.2.10/lib/chef/knife/cloudstack\_server\_create.rb:19

Based on that line, I'd guess the knife cloudstack plugin isn't specifying its dependencies?

> from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand\_loader.rb:37:in  
> `load' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand_loader.rb:37:in `load\_commands'  
> from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand\_loader.rb:37:in  
> `each' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife/core/subcommand_loader.rb:37:in `load\_commands'  
> from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:114:in  
> `load_commands' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/knife.rb:162:in `run'  
> from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/lib/chef/application/knife.rb:123:in  
> `run' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/knife:25 from /usr/bin/knife:19:in `load'  
> from /usr/bin/knife:19

--  
Dan DeLeo
