#1

I just upgraded ruby. Now chef is nt working

How do I resolve?

ubuntu@ubuntu-VirtualBox:~$ knife cookbook upload environment -E development
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'chef' (>= 0) among 8 total gem(s) (Gem::LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec’
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/bin/knife:22:in


#2

How did you originally install Chef? Did you use rubygems or an Omnibus
package?

What ruby is saying is that you haven’t installed Chef for Ruby 2.0 yet.
The gems for Ruby 2.0.0 are going to be segregated from the Ruby 1.9 gems.
If you’ve installed via Rubygems before you can simply run a gem install chef to get going again.

I’d strongly recommend, however, that you install Chef from an Omnibus
package: www.opscode.com/chef/install

On Thu, Nov 14, 2013 at 5:03 PM, David Montgomery <davidmontgomery@gmail.com

wrote:

I just upgraded ruby. Now chef is nt working

How do I resolve?

ubuntu@ubuntu-VirtualBox:~$ knife cookbook upload environment -E
development
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'chef' (>= 0) among 8 total gem(s) (Gem::LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec’
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/bin/knife:22:in


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


#3

Here is how I installed

curl -L http://www.opscode.com/chef/install.sh | sudo bash

On Fri, Nov 15, 2013 at 9:06 AM, Stephen Delano stephen@opscode.com wrote:

How did you originally install Chef? Did you use rubygems or an Omnibus
package?

What ruby is saying is that you haven’t installed Chef for Ruby 2.0 yet.
The gems for Ruby 2.0.0 are going to be segregated from the Ruby 1.9 gems.
If you’ve installed via Rubygems before you can simply run a gem install chef to get going again.

I’d strongly recommend, however, that you install Chef from an Omnibus
package: www.opscode.com/chef/install

On Thu, Nov 14, 2013 at 5:03 PM, David Montgomery <
davidmontgomery@gmail.com> wrote:

I just upgraded ruby. Now chef is nt working

How do I resolve?

ubuntu@ubuntu-VirtualBox:~$ knife cookbook upload environment -E
development
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'chef' (>= 0) among 8 total gem(s) (Gem::LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec’
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/bin/knife:22:in


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


#4

Hi David,

It looks like you’ve got Chef installed via Omnibus, so let’s try to get to
the bottom of why knife is trying to run from Rubygems and not the embedded
knife. Can you post the output of the following commands?

  • which knife
  • gem which knife
  • /opt/chef/embedded/bin/knife --version

Cheers!

On Thu, Nov 14, 2013 at 5:07 PM, David Montgomery <davidmontgomery@gmail.com

wrote:

Here is how I installed

curl -L http://www.opscode.com/chef/install.sh | sudo bash

On Fri, Nov 15, 2013 at 9:06 AM, Stephen Delano stephen@opscode.comwrote:

How did you originally install Chef? Did you use rubygems or an Omnibus
package?

What ruby is saying is that you haven’t installed Chef for Ruby 2.0 yet.
The gems for Ruby 2.0.0 are going to be segregated from the Ruby 1.9 gems.
If you’ve installed via Rubygems before you can simply run a gem install chef to get going again.

I’d strongly recommend, however, that you install Chef from an Omnibus
package: www.opscode.com/chef/install

On Thu, Nov 14, 2013 at 5:03 PM, David Montgomery <
davidmontgomery@gmail.com> wrote:

I just upgraded ruby. Now chef is nt working

How do I resolve?

ubuntu@ubuntu-VirtualBox:~$ knife cookbook upload environment -E
development
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'chef' (>= 0) among 8 total gem(s) (Gem::LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec’
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/bin/knife:22:in


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


#5

Running gem install chef fixed the problem. Thanks

On Fri, Nov 15, 2013 at 12:12 PM, Stephen Delano stephen@opscode.comwrote:

Hi David,

It looks like you’ve got Chef installed via Omnibus, so let’s try to get
to the bottom of why knife is trying to run from Rubygems and not the
embedded knife. Can you post the output of the following commands?

  • which knife
  • gem which knife
  • /opt/chef/embedded/bin/knife --version

Cheers!

On Thu, Nov 14, 2013 at 5:07 PM, David Montgomery <
davidmontgomery@gmail.com> wrote:

Here is how I installed

curl -L http://www.opscode.com/chef/install.sh | sudo bash

On Fri, Nov 15, 2013 at 9:06 AM, Stephen Delano stephen@opscode.comwrote:

How did you originally install Chef? Did you use rubygems or an Omnibus
package?

What ruby is saying is that you haven’t installed Chef for Ruby 2.0 yet.
The gems for Ruby 2.0.0 are going to be segregated from the Ruby 1.9 gems.
If you’ve installed via Rubygems before you can simply run a gem install chef to get going again.

I’d strongly recommend, however, that you install Chef from an Omnibus
package: www.opscode.com/chef/install

On Thu, Nov 14, 2013 at 5:03 PM, David Montgomery <
davidmontgomery@gmail.com> wrote:

I just upgraded ruby. Now chef is nt working

How do I resolve?

ubuntu@ubuntu-VirtualBox:~$ knife cookbook upload environment -E
development
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'chef' (>= 0) among 8 total gem(s) (Gem::LoadError) from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec’
from
/usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem' from /usr/local/bin/knife:22:in


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104


Stephen Delano
Software Development Engineer
Opscode, Inc.
1008 Western Avenue
Suite 601
Seattle, WA 98104