Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: 0.5.4
-
Component/s: None
-
Labels:None
-
Environment:
Windows 2003 and Windows Vista
Description
Using latest ohai v0.5.0 on Windows Vista or 2003 server.
Z:\dev\right_net\instance>ohai -l debug
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: Loading plugin os
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: Loading plugin ruby
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: Loading plugin languages
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: ---- Begin ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['
host_vendor']},host:#{::Config::CONFIG['host']},target:#{::Config::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir'
]},host_os:#{::Config::CONFIG['host_os']},version:#{RUBY_VERSION},target_cpu:#{::Config::CONFIG['target_cpu']},ruby_bin:
#{::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::Config::CONFIG['targ
et_vendor']},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},host_cpu:#{::Config::CONFIG['host_cpu'
]},release_date:#{RUBY_RELEASE_DATE},\"" STDOUT ----
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG:
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: ---- End ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['ho
st_vendor']},host:#{::Config::CONFIG['host']},target:#{::Config::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir']}
,host_os:#{::Config::CONFIG['host_os']},version:#{RUBY_VERSION},target_cpu:#{::Config::CONFIG['target_cpu']},ruby_bin:#{
::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::Config::CONFIG['target
_vendor']},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},host_cpu:#{::Config::CONFIG['host_cpu']}
,release_date:#{RUBY_RELEASE_DATE},\"" STDOUT ----
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: ---- Begin ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['
host_vendor']},host:#{::Config::CONFIG['host']},target:#{::Config::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir'
]},host_os:#{::Config::CONFIG['host_os']},version:#{RUBY_VERSION},target_cpu:#{::Config::CONFIG['target_cpu']},ruby_bin:
#{::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::Config::CONFIG['targ
et_vendor']},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},host_cpu:#{::Config::CONFIG['host_cpu'
]},release_date:#{RUBY_RELEASE_DATE},\"" STDERR ----
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: -e:1: unterminated string meets end of file
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: ---- End ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['ho
st_vendor']},host:#{::Config::CONFIG['host']},target:#{::Config::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir']}
,host_os:#{::Config::CONFIG['host_os']},version:#{RUBY_VERSION},target_cpu:#{::Config::CONFIG['target_cpu']},ruby_bin:#{
::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::Config::CONFIG['target
_vendor']},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},host_cpu:#{::Config::CONFIG['host_cpu']}
,release_date:#{RUBY_RELEASE_DATE},\"" STDERR ----
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: Ran (ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['host_
vendor']},host:#{::Config::CONFIG['host']},target:#{::Config::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir']},ho
st_os:#{::Config::CONFIG['host_os']},version:#{RUBY_VERSION},target_cpu:#{::Config::CONFIG['target_cpu']},ruby_bin:#{::F
ile.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::Config::CONFIG['target_ve
ndor']},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},host_cpu:#{::Config::CONFIG['host_cpu']},re
lease_date:#{RUBY_RELEASE_DATE},\"") returned 1
[Fri, 26 Mar 2010 14:38:49 -0700] DEBUG: Loading plugin kernel
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: Failed to run: uname -s, assuming command not found
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: ---- Begin uname -s STDOUT ----
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG:
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: ---- End uname -s STDOUT ----
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: ---- Begin uname -s STDERR ----
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: Failed to run: uname -s, assuming command not found
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: ---- End uname -s STDERR ----
[Fri, 26 Mar 2010 14:38:50 -0700] DEBUG: Plugin kernel threw exception #<Ohai::Exceptions::Exec: returned 42, expected
0>
C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in `join': can't convert nil
into String (TypeError)
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in `all_plugins'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in `each'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in `all_plugins'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/application.rb:89:in `run_appl
ication'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/application.rb:67:in `run'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/bin/ohai:40
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/bin/ohai:19:in `load'
from C:/PROGRA~2/RIGHTS~1/SandBox/Ruby/bin/ohai:19
When I add some debugging to ohai, I discover that the ruby plugin is failing because the 'rbconfig' command line fails:
C:\Windows\system32>ohai
ruby -e "require 'rbconfig'; puts \"host_vendor:#{::Config::CONFIG['host_vendor']},host:#{::Config::CONFIG['host']},target:#{::C
onfig::CONFIG['target']},bin_dir:#{::Config::CONFIG['bindir']},host_os:#{::Config::CONFIG['host_os']},target_cpu:#{::Config::CON
FIG['target_cpu']},ruby_bin:#{::File.join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name'])},target_vendor:#{::
Config::CONFIG['target_vendor']},version:#{RUBY_VERSION},target_os:#{::Config::CONFIG['target_os']},platform:#{RUBY_PLATFORM},ho
st_cpu:#{::Config::CONFIG['host_cpu']},release_date:#{RUBY_RELEASE_DATE},\""
languages[:ruby][:host_os] =
C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in `join': can't convert nil into String (TypeError)
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:121:in `all_plugins'
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/system.rb:118:in `all_plugins'
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/application.rb:89:in `run_application'
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/lib/ohai/application.rb:67:in `run'
from C:/Ruby/lib/ruby/gems/1.8/gems/ohai-0.5.0/bin/ohai:40
from C:/Ruby/bin/ohai:19:in `load'
from C:/Ruby/bin/ohai:19
This issue is fixed in the branch changes for
OHAI-105