delano / rye

Safe, parallel access to Unix shells from Ruby
http://delano.github.com/rye
MIT License
234 stars 32 forks source link

Error under rubinius 2.2.5 - "Unknown field name" #52

Closed CpuID closed 10 years ago

CpuID commented 10 years ago

I get the below error when trying to initialize a box with Rye:

Unknown field name (RuntimeError)

Stack trace below. Looks like this could be the upstream sysinfo gem, as opposed to rye itself? Please let me know your thoughts, or if we can work around it within Rye.

sysinfo (0.8.1) rye (0.9.12)

            Rubinius::FFI::Struct(Struct::Passwd)#[] at kernel/platform/struct.rb:279
                                   SysInfo#getpwattr at /usr/local/var/rbenv/versions/rbx-2.2.5/gems/gems/sysinfo-0.8.1/lib/sysinfo.rb:275
                                  SysInfo#initialize at /usr/local/var/rbenv/versions/rbx-2.2.5/gems/gems/sysinfo-0.8.1/lib/sysinfo.rb:82
                                         Rye.sysinfo at /usr/local/var/rbenv/versions/rbx-2.2.5/gems/gems/rye-0.9.12/lib/rye.rb:76
                                 Rye::Box#initialize at /usr/local/var/rbenv/versions/rbx-2.2.5/gems/gems/rye-0.9.12/lib/rye/box.rb:122
delano commented 10 years ago

Ya looks like it's in the SysInfo#getpwattr call in sysinfo. I don't use rubinius but I'm happy to pull in a patch (over at https://github.com/delano/sysinfo/issues).