Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: lin lin
RE: Sys::Uptime on win32 [ reply ]  
2007-12-25 07:02
Oops, nevermind, upgrading from ruby-1.8.6 to ruby-1.8.6-p111 did the trick.

By: lin lin
Sys::Uptime on win32 [ reply ]  
2007-12-25 06:22
Hello,

I'm getting the following error, it seems that Sys::Uptime needs to require 'time'?

Thanks,

Lin
----
C:\Documents and Settings\Lin Lin>gem install sys-uptime
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed sys-uptime-0.5.1-x86-mswin32
1 gem installed
Installing ri documentation for sys-uptime-0.5.1-x86-mswin32...
Installing RDoc documentation for sys-uptime-0.5.1-x86-mswin32...

C:\Documents and Settings\Lin Lin>irb
irb(main):001:0> require 'sys/uptime'
=> true
irb(main):002:0> Sys::Uptime.seconds
NoMethodError: undefined method `parse' for Time:Class
from c:/ruby/lib/ruby/gems/1.8/gems/sys-uptime-0.5.1-x86-mswin32/lib/sys
/uptime.rb:75:in `parse_ms_date'
from c:/ruby/lib/ruby/gems/1.8/gems/sys-uptime-0.5.1-x86-mswin32/lib/sys
/uptime.rb:90:in `get_dhms'
from c:/ruby/lib/ruby/gems/1.8/gems/sys-uptime-0.5.1-x86-mswin32/lib/sys
/uptime.rb:89:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/sys-uptime-0.5.1-x86-mswin32/lib/sys
/uptime.rb:89:in `get_dhms'
from c:/ruby/lib/ruby/gems/1.8/gems/sys-uptime-0.5.1-x86-mswin32/lib/sys
/uptime.rb:65:in `seconds'
from (irb):2