Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.1.1 ping failed under Ruby 2.7 #352

Closed
byungjikroh opened this issue Jun 1, 2020 · 7 comments · Fixed by #353
Closed

v6.1.1 ping failed under Ruby 2.7 #352

byungjikroh opened this issue Jun 1, 2020 · 7 comments · Fixed by #353

Comments

@byungjikroh
Copy link

An error about 'Ping failed for Google: #<NoMethodError: private method `open' called for URI:Module>' at v6.1.1 because of a patch to support URI.open instead of depreciated Kernel#open (#342).

But Ruby version below than 2.7 (I'm not sure), there is no URI.open method so it causes errors when ping to Google or Bing.

Please patch to support Kernel#open for Ruby version below than 2.7.

@kjvarga
Copy link
Owner

kjvarga commented Jun 2, 2020

Thanks for the report!

@kjvarga
Copy link
Owner

kjvarga commented Jun 2, 2020

@Envek it looks like this was missed in your implementation. Are you able to suggest a fix?

@Envek
Copy link

Envek commented Jun 2, 2020

Ah, URI.open was added only in Ruby 2.5, quite recently: https://rubyreferences.github.io/rubychanges/2.5.html#network-and-web

@byungjikroh
Copy link
Author

So it needs to update to support under Ruby 2.5 or to set 'required Ruby version' to Ruby 2.5 and above.

Since I use below Ruby 2.5, I prefer supporting old Ruby versions.

Envek added a commit to Envek/sitemap_generator that referenced this issue Jun 2, 2020
NoMethodError: private method `open' called for URI:Module was raised on older rubies as URI.open was added only in Ruby 2.5: https://rubyreferences.github.io/rubychanges/2.5.html#network-and-web
@Envek
Copy link

Envek commented Jun 2, 2020

Added support for old rubies in #353


@byungjikroh, please note that rubies older than 2.5 are not supported anymore:

WARNING: ruby-2.4.10 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.

So it is better to upgrade anyway

@byungjikroh
Copy link
Author

Sure. Thanks a lot. 😀

@kjvarga
Copy link
Owner

kjvarga commented Jun 3, 2020

Fixed in v6.1.2. It's now backwards compatible with older Rubies. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants