JorenSix/Panako

create_dataset.rb doesn't work with Ruby 3.2.x

alexkops opened this issue · 1 comments

I tried to run the script resources/scripts/create_test_dataset/create_dataset.rb with Ruby 3.2.2, but it failed:

> ruby create_dataset.rb 
create_dataset.rb:79:in `<main>': undefined method `exists?' for File:Class (NoMethodError)

FileUtils.mkdir_p(QUERY_FOLDER) unless File.exists? QUERY_FOLDER
                                           ^^^^^^^^
Did you mean?  exist?

This is because using exists? is deprecated since Ruby 2.1 and was removed in 3.2: https://stackoverflow.com/a/75353113
After downgrading the version to Ruby 3.1.4 it works.

Thanks for the bug report! It has been fixed, see the commit. Thanks @alexkops!