Rubygems 1.6.2 and chef 0.9.14 on ubuntu 10.04


#1

After installing the latest stable rubygems 1.6.2, chef-client breaks as such:

root@host:~# chef-client
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:4
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:31
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/providers.rb:59
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef.rb:25
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/bin/chef-client:23
root@chili:~#

Anyone seen this?

Brian


#2

On Tuesday, March 15, 2011 at 9:28 PM, Brian Merritt wrote:
After installing the latest stable rubygems 1.6.2, chef-client breaks as such:

root@host:~# chef-client
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)

Try adding require ‘rubygems/user_interaction’ to your client.rb or recipe and see if that works around.

This is pretty strange though, when I do gem open rubygems-update, I see that I have VERSION = '1.6.2' in rubygems.rb, and spec_fetcher.rb does require 'rubygems/user_interaction' on line 2.

The changelog for rubygems says this issue was fixed as of version 1.5.1.

I haven’t tried running Chef with a gem_package resource in your configuration, though.

Anyone seen this?

Brian

Dan DeLeo


#3

Adding 'require ‘rubygems/user_interaction’ to usr/lib/ruby/1.8/rubygems/remote_fetcher.rb solved the first problem, but now I have a new one:

[Wed, 16 Mar 2011 04:58:09 +0000] ERROR: Exception handlers complete
/usr/lib/ruby/1.8/rubygems/dependency_installer.rb:92:in find_gems_with_sources': undefined methodversion_requirements’ for #Gem::Dependency:0x7fedb19474f0 (NoMethodError)
from /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:215:in install' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:153:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:176:in with_correct_verbosity' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:152:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:87:in with_gem_sources' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:151:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:398:in install_package' from /usr/lib/ruby/1.8/chef/provider/package.rb:60:inaction_install’
from /usr/lib/ruby/1.8/chef/resource.rb:395:in send' from /usr/lib/ruby/1.8/chef/resource.rb:395:inrun_action’
from /usr/lib/ruby/1.8/chef/runner.rb:53:in run_action' from /usr/lib/ruby/1.8/chef/runner.rb:89:inconverge’
from /usr/lib/ruby/1.8/chef/runner.rb:89:in each' from /usr/lib/ruby/1.8/chef/runner.rb:89:inconverge’
from /usr/lib/ruby/1.8/chef/resource_collection.rb:94
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:116:in call' from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:116:incall_iterator_block’
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:85:in step' from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:104:initerate’
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' from /usr/lib/ruby/1.8/chef/resource_collection.rb:92:inexecute_each_resource’
from /usr/lib/ruby/1.8/chef/runner.rb:84:in converge' from /usr/lib/ruby/1.8/chef/client.rb:268:inconverge’
from /usr/lib/ruby/1.8/chef/client.rb:171:in run' from /usr/lib/ruby/1.8/chef/application/client.rb:222:inrun_application’
from /usr/lib/ruby/1.8/chef/application/client.rb:212:in loop' from /usr/lib/ruby/1.8/chef/application/client.rb:212:inrun_application’
from /usr/lib/ruby/1.8/chef/application.rb:62:in `run’
from /usr/bin/chef-client:26
root@host:/usr/lib/ruby/1.8/rubygems#

I couldn’t find any open bugs that seem to relate to this error (or the last one). Wondering if I have something strange going on in my ruby* install.

I do have gem_packages in the recipes applied to the effected host.

Brian

On Mar 15, 2011, at 9:43 PM, Daniel DeLeo wrote:

On Tuesday, March 15, 2011 at 9:28 PM, Brian Merritt wrote:

After installing the latest stable rubygems 1.6.2, chef-client breaks as such:

root@host:~# chef-client
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)

Try adding require ‘rubygems/user_interaction’ to your client.rb or recipe and see if that works around.

This is pretty strange though, when I do gem open rubygems-update, I see that I have VERSION = '1.6.2' in rubygems.rb, and spec_fetcher.rb does require 'rubygems/user_interaction' on line 2.

The changelog for rubygems says this issue was fixed as of version 1.5.1.

I haven’t tried running Chef with a gem_package resource in your configuration, though.

Anyone seen this?

Brian

Dan DeLeo


#4

On Tuesday, March 15, 2011 at 10:00 PM, Brian Merritt wrote:
Adding 'require ‘rubygems/user_interaction’ to usr/lib/ruby/1.8/rubygems/remote_fetcher.rb solved the first problem, but now I have a new one:

[Wed, 16 Mar 2011 04:58:09 +0000] ERROR: Exception handlers complete
/usr/lib/ruby/1.8/rubygems/dependency_installer.rb:92:in find_gems_with_sources': undefined methodversion_requirements’ for #Gem::Dependency:0x7fedb19474f0 (NoMethodError)
from /usr/lib/ruby/1.8/rubygems/dependency_installer.rb:215:in install' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:153:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:176:in with_correct_verbosity' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:152:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:87:in with_gem_sources' from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:151:ininstall’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:398:in install_package' from /usr/lib/ruby/1.8/chef/provider/package.rb:60:inaction_install’
from /usr/lib/ruby/1.8/chef/resource.rb:395:in send' from /usr/lib/ruby/1.8/chef/resource.rb:395:inrun_action’
from /usr/lib/ruby/1.8/chef/runner.rb:53:in run_action' from /usr/lib/ruby/1.8/chef/runner.rb:89:inconverge’
from /usr/lib/ruby/1.8/chef/runner.rb:89:in each' from /usr/lib/ruby/1.8/chef/runner.rb:89:inconverge’
from /usr/lib/ruby/1.8/chef/resource_collection.rb:94
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:116:in call' from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:116:incall_iterator_block’
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:85:in step' from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:104:initerate’
from /usr/lib/ruby/1.8/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' from /usr/lib/ruby/1.8/chef/resource_collection.rb:92:inexecute_each_resource’
from /usr/lib/ruby/1.8/chef/runner.rb:84:in converge' from /usr/lib/ruby/1.8/chef/client.rb:268:inconverge’
from /usr/lib/ruby/1.8/chef/client.rb:171:in run' from /usr/lib/ruby/1.8/chef/application/client.rb:222:inrun_application’
from /usr/lib/ruby/1.8/chef/application/client.rb:212:in loop' from /usr/lib/ruby/1.8/chef/application/client.rb:212:inrun_application’
from /usr/lib/ruby/1.8/chef/application.rb:62:in `run’
from /usr/bin/chef-client:26
root@host:/usr/lib/ruby/1.8/rubygems#

I couldn’t find any open bugs that seem to relate to this error (or the last one). Wondering if I have something strange going on in my ruby* install.

Yeah, your error messages don’t line up with the source of rubygems-update I’m looking at. For example, line 92 of dependency_installer.rb looks like this for me:

gems_and_sources << [spec, gem_file] if spec.name == dep.name

And I don’t have the string version_requirements anywhere in that file. I also see in the history file this message:

  • Gem::Dependency#version_requirements is deprecated and will be removed on or
    after August 2010.

Listed for version 1.3.6 release notes.

Try printing/logging the value of Gem::VERSION in your recipe to see if a different/older rubygems install is getting loaded for some reason. You might also poke around in the rubygems code in usr/lib/ruby/1.8/ to see if it matches what you expect.

HTH