scrapper / postrunner

Application to manage FIT files such as those produced by Garmin fitness devices
GNU General Public License v2.0
62 stars 14 forks source link

ERROR: undefined method `exists?' for Dir:Class w/ Ruby 3.x #42

Closed larsks closed 1 year ago

larsks commented 1 year ago

I've successfully installed postrunner under Ruby 3.2.2 by running gem install postrunner. Unfortunately, when attempting to run it, it fails like this:

root@8cec5a50d5d0:/# postrunner list
ERROR: undefined method `exists?' for Dir:Class
/usr/local/bundle/gems/postrunner-1.1.1/lib/postrunner/DirUtils.rb:20:in `create_directory'
/usr/local/bundle/gems/postrunner-1.1.1/lib/postrunner/Main.rb:57:in `main'
/usr/local/bundle/gems/postrunner-1.1.1/lib/postrunner.rb:24:in `<module:PostRunner>'
/usr/local/bundle/gems/postrunner-1.1.1/lib/postrunner.rb:22:in `<top (required)>'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/usr/local/bundle/gems/postrunner-1.1.1/bin/postrunner:4:in `<top (required)>'
/usr/local/bundle/bin/postrunner:25:in `load'
/usr/local/bundle/bin/postrunner:25:in `<main>'

*******************************************************************************
You have triggered a bug in PostRunner 1.1.1!

This appears to be a Ruby version compatibility issue...postrunner runs fine with the latest 2.x version (2.7.8).

scrapper commented 1 year ago

Yes, this is indeed a backwards compatibility issue with Ruby. We already had a fix for that in the git repo. I've now released version 1.2.0 that includes that fix.