Skip to content

stat.st_gid is unsupported on windows #3457

@ahorek

Description

@ahorek

jruby master, rails 4.2.4

irb(main):002:0> Rails.cache.write('aaa', 'aaa')
NotImplementedError: stat.st_gid unsupported or native support failed to load
        from org/jruby/RubyFileStat.java:269:in `gid'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/core_ext/file/atomic.rb:40:in `atomic_write'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache/file_store.rb:83:in `write_entry'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache.rb:115:in `write_entry'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache.rb:391:in `block in write'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache.rb:547:in `block in instrument'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache.rb:547:in `instrument'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/activesupport-4.2.4/lib/active_support/cache.rb:389:in `write'
        from (irb):2:in `<eval>'
        from org/jruby/RubyKernel.java:978:in `eval'
        from org/jruby/RubyKernel.java:1291:in `loop'
        from org/jruby/RubyKernel.java:1098:in `catch'
        from org/jruby/RubyKernel.java:1098:in `catch'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/railties-4.2.4/lib/rails/commands/console.rb:110:in `start'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/railties-4.2.4/lib/rails/commands/console.rb:9:in `start'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:68:in `console'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/jruby_test/jruby/lib/ruby/gems/shared/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top>'
        from org/jruby/RubyKernel.java:939:in `require'
        from bin/rails:4:in `<top>'irb(main):003:0>
c:\jruby_test\jruby\bin>jruby -e "File.stat('/jruby_test').gid"
NotImplementedError: stat.st_gid unsupported or native support failed to load
    gid at org/jruby/RubyFileStat.java:269
  <top> at -e:1

related to
https://github.com/jnr/jnr-posix/blob/master/src/main/java/jnr/posix/JavaFileStat.java#L134

return posix.getgid(); ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions