Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading sys-uptime on windows #3

Closed
jkburges opened this issue May 12, 2016 · 4 comments
Closed

Error loading sys-uptime on windows #3

jkburges opened this issue May 12, 2016 · 4 comments

Comments

@jkburges
Copy link
Contributor

I'm getting the following error:

irb(main):001:0> require 'sys/uptime'
FFI::NotFoundError: Function 'sysconf' not found in [msvcrt.dll]
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi/library.rb:261:in `attach_function'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sys-uptime-0.7.0/lib/unix/sys/uptime.rb:28:in `<class:Uptime>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sys-uptime-0.7.0/lib/unix/sys/uptime.rb:8:in `<module:Sys>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sys-uptime-0.7.0/lib/unix/sys/uptime.rb:4:in `<top (required)>'
        from (irb):1:in `require'
        from (irb):1
        from C:/Ruby22-x64/bin/irb:11:in `<main>'

with

PS C:\vagrant> ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
@jkburges
Copy link
Contributor Author

Seems like a similar error to djberg96/sys-uname#2

@jkburges
Copy link
Contributor Author

jkburges commented May 12, 2016

FWIW, I was able to workaround this with require 'windows/sys/uptime'

@djberg96
Copy link
Owner

Try "require 'sys-uptime'".

I guess I should make it so that either one works. Thanks for the report.

@jkburges
Copy link
Contributor Author

Thanks, that works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants