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

[9.2.0.0] uninitialized constant FileUtils::EISDIR #5201

Closed
boris-petrov opened this issue May 28, 2018 · 6 comments
Closed

[9.2.0.0] uninitialized constant FileUtils::EISDIR #5201

boris-petrov opened this issue May 28, 2018 · 6 comments

Comments

@boris-petrov
Copy link

boris-petrov commented May 28, 2018

Calling FileUtils.remove_entry_secure(some_dir) fails with NameError: uninitialized constant FileUtils::EISDIR. This didn't happen on 9.1.17.0.

@ChrisBr
Copy link
Contributor

ChrisBr commented May 28, 2018

Tested with current master and I can not reproduce. Can you maybe provide a full script? And also the platform & java version?

@boris-petrov
Copy link
Author

@ChrisBr - yes, sorry, should have noted:

%  java -version 
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
%  uname -a
Linux boris-laptop 4.16.11-1-ARCH #1 SMP PREEMPT Tue May 22 21:40:27 UTC 2018 x86_64 GNU/Linux

I'm not sure I'll be able to create a reproduction easily. Will try in the next few days.

@kares
Copy link
Member

kares commented May 29, 2018

this seems weird - all working fine (on Ubuntu Linux), for me as well :

irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> FileUtils.remove_entry_secure('some_dir')
Traceback (most recent call last):
        8: from /home/kares/workspace/oss/jruby/bin/jirb:13:in `<main>'
        7: from org/jruby/RubyKernel.java:1180:in `catch'
        6: from org/jruby/RubyKernel.java:1180:in `catch'
        5: from org/jruby/RubyKernel.java:1418:in `loop'
        4: from org/jruby/RubyKernel.java:1037:in `eval'
        3: from (irb):2:in `<eval>'
        2: from /home/kares/workspace/oss/jruby/lib/ruby/stdlib/fileutils.rb:673:in `remove_entry_secure'
        1: from org/jruby/RubyFile.java:959:in `lstat'
Errno::ENOENT (No such file or directory - /home/kares/workspace/oss/jruby/some_dir)
irb(main):003:0> `mkdir some_dir`
=> ""
irb(main):006:0> FileUtils.remove_entry_secure('some_dir')
=> nil

@boris-petrov
Copy link
Author

boris-petrov commented May 29, 2018

I see. Well, then I will have to create a reproduction at some point. A bit more context until that time - this happens in an after :all do block in an RSpec.feature block run in Capybara. Not sure if it helps much but just some information.

@headius
Copy link
Member

headius commented May 30, 2018

JRuby is using the fileutils gem now in 9.2, which should include all JRuby-specific bits. But EISDIR has been defined for some time, so I'm not sure why it would be missing.

Double check if you are running with an earlier fileutils gem perhaps? I'm not sure what else to look for.

@headius
Copy link
Member

headius commented Jun 28, 2018

@boris-petrov If you are able to get a reproduction, feel free to reopen or otherwise let us know. I don't have any theories for you, and this works ok for us and others, so I'm going to close it for now.

@headius headius closed this as completed Jun 28, 2018
@headius headius added this to the Invalid or Duplicate milestone Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants