Skip to content

Instantly share code, notes, and snippets.

@btm
Forked from jtimberman/gist:143814
Created July 9, 2009 17:55
Show Gist options
  • Save btm/143833 to your computer and use it in GitHub Desktop.
Save btm/143833 to your computer and use it in GitHub Desktop.
Installing Ohai on Windows:
Install Ruby via one-click installer (I used ruby186-27_rc)
http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
Start the RubyGems Package Manager
Programs -> Ruby-186-27 -> RubyGems -> RubyGems Package Manager
Add gems.opscode.com to gem sources.
C:\Ruby>gem sources -a http://gems.opscode.com
Verify the following gems are installed first, they should be by default:
C:\Ruby>gem list
fxri
fxruby
hpricot
log4r
ptools
rake
ruby-opengl
test-unit
win32-api
win32-clipboard
win32-dir
win32-eventlog
win32-file
win32-file-stat
win32-process
win32-sapi
win32-sound
windows-api
windows-pr
Install ohai and wmi bindings
C:\Ruby>gem install ohai ruby-wmi
Run Ohai:
C:\Ruby>ohai
{
"dmi": {
},
"command": {
},
"kernel": {
},
"platform_version": null,
"platform": "mswin32",
"keys": {
},
"network": {
"interfaces": {
}
},
"ohai_time": 1247162366.84,
"os": "mswin32",
"counters": {
"network": {
}
},
"os_version": null,
"languages": {
"ruby": {
"target_os": "mswin32",
"platform": "i386-mswin32",
"host_vendor": "pc",
"target_vendor": "pc",
"target_cpu": "i386",
"host_os": "mswin32",
"host_cpu": "i686",
"version": "1.8.6",
"host": "i686-pc-mswin32",
"target": "i386-pc-mswin32",
"release_date": "2008-08-11"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment