SciRuby / nmatrix

Dense and sparse linear algebra library for Ruby via SciRuby
Other
469 stars 133 forks source link

Dir.exists? removed in Ruby 3.2 #636

Open ScotterC opened 1 year ago

ScotterC commented 1 year ago

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

alexis commented 9 months ago

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).

translunar commented 9 months ago

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

kojix2 commented 9 months ago

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

barracuda156 commented 6 months ago

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