Forum: JRuby chmod in a File block

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joe Kutner (Guest)
on 2013-10-22 21:20
(Received via mailing list)
While looking at a CI failure on the rubyzip gem, I found that an error
was generated from a line like this:"data/generated/empty_chmod640.txt", "w") { |f| f.chmod(0640)

The error was: "RuntimeError: No such file or directory -

The error was consistent in the test suite, but I was not able to
reproduce it outside of the test suite.  A simple change fixed the

Could this be a JRuby bug? Are there any known related issues?
Thomas E Enebo (Guest)
on 2013-10-22 22:08
(Received via mailing list)
Is it on Windows?  I would think we create the file write away, but
is really unhappy doing 2 things to one file at the same time.

Joe Kutner (Guest)
on 2013-10-22 22:11
(Received via mailing list)
No, Mac OS X and Ubuntu (happens on both).  But i couldn't reproduce it
in isolation.  So it works in general.
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles Nutter (headius)
on 2013-10-22 22:59
(Received via mailing list)
Ahh, so that's why it wasn't working :-) I was running into that too.

It sounds like a JRuby bug but I don't know why it would fail that way.

- Charlie
Joe Kutner (Guest)
on 2013-10-22 23:14
(Received via mailing list)
This topic is locked and can not be replied to.