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

Support for Ruby 3 #179

Closed
ankane opened this issue Dec 27, 2020 · 6 comments · Fixed by #182
Closed

Support for Ruby 3 #179

ankane opened this issue Dec 27, 2020 · 6 comments · Fixed by #182

Comments

@ankane
Copy link

ankane commented Dec 27, 2020

Hi @lfittl, thanks for this awesome project! With the latest version, installation fails for Ruby 3 with:

extconf.rb:15:in `initialize': No such file or directory @ rb_sysopen - https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.1 (Errno::ENOENT)
	from extconf.rb:15:in `open'
	from extconf.rb:15:in `block in <main>'
	from extconf.rb:14:in `open'
	from extconf.rb:14:in `<main>'

Looking at extconf.rb, I think it needs to use URI.open instead of open based on the Ruby 2.7 deprecation warning (warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open).

@stanhu
Copy link
Contributor

stanhu commented Dec 27, 2020

I think this may be covered by #178?

@lfittl Perhaps this warrants a new release now?

@lfittl
Copy link
Member

lfittl commented Dec 28, 2020

@ankane @stanhu Yup, agreed, thats a good reason for a release - 1.3.0 has been released now & pushed to Rubygems.

Happy holidays! 🎆

@ankane
Copy link
Author

ankane commented Dec 28, 2020

Awesome, thanks @lfittl! Happy holidays to you, too.

@ankane
Copy link
Author

ankane commented Dec 28, 2020

Just fyi, it looks like URI.open is private in Ruby < 2.5, so it may make sense to add s.required_ruby_version = ">= 2.5" to the gemspec.

@lfittl
Copy link
Member

lfittl commented Dec 28, 2020

@ankane Yeah, I noticed that earlier. Given that Ruby < 2.5 is EOL, I think its probably fine to not handle that? (unless you see a benefit in adding it to the gemspec?)

@ankane
Copy link
Author

ankane commented Dec 29, 2020

If it was part of the 1.3.0 release, Bundler would install 1.2.0 on Ruby 2.4 instead of failing with 1.3.0, so may just be something to keep in mind for next time.

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