thecodecrate / city-state

Simple ruby gem to create form lists with cities and states
MIT License
306 stars 135 forks source link

"No such file or directory @ rb_sysopen <url>" when attempting update #51

Open MaffooClock opened 2 years ago

MaffooClock commented 2 years ago

When executing CS.update, I receive the following error:

No such file or directory @ rb_sysopen - https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City-CSV&license_key=redacted&suffix=zip (Errno::ENOENT)    

The update_maxmind method is using OpenURI as just open(), which is an override of Kernel#open, but such use was deprecated in Ruby 2.7.

This was changed in OpenURI in Commit #0c2986a, roughly a year before the current v0.2.0 was released.

The solution here is to either: