nmatrix icon indicating copy to clipboard operation
nmatrix copied to clipboard

Dir.exists? removed in Ruby 3.2

Open ScotterC opened this issue 2 years ago • 4 comments

Extconf uses Dir.exists? which was removed in Ruby 3.2 (ruby-lang issue) https://github.com/SciRuby/nmatrix/blob/beb266ed1ae56206af73f8f94bf9956213f9997b/ext/nmatrix/extconf.rb#L57-L64

To those running into this problem here's a monkey patch gem file_exists which is really just this alias_method

ScotterC avatar Jun 22 '23 14:06 ScotterC

And it's possible to install it by adding it to a Gemfile, with RUBYOPT='-rfile_exists' bundle. (Though N[] syntax didn't work for me in ruby 3.2).

alexis avatar Dec 09 '23 18:12 alexis

I don't think anyone is maintaining this library anymore. I encourage you to fork it if you'd like to!

translunar avatar Dec 13 '23 03:12 translunar

Use numo-narray. https://github.com/ruby-numo/numo-narray

kojix2 avatar Dec 13 '23 04:12 kojix2

Got the same error; it should just be patched to use exist? instead.

barracuda156 avatar Feb 27 '24 13:02 barracuda156