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

Ruby 2.3 requirement #161

Closed
BanzaiMan opened this issue Jun 4, 2019 · 7 comments
Closed

Ruby 2.3 requirement #161

BanzaiMan opened this issue Jun 4, 2019 · 7 comments
Assignees

Comments

@BanzaiMan
Copy link

Why is the Ruby 2.3 required? Is there a technical reason for it? I see failures such as https://travis-ci.org/weppos/publicsuffix-ruby/builds/524378634, but it seems to me that the problem is not of code, but of convenience, namely, Bundler you are using on Travis does not support Ruby < 2.3.0. This, I believe, is avoidable by using Bundler < 2.0.

@weppos
Copy link
Owner

weppos commented Jun 4, 2019

Any reason I should support versions of Ruby that have reached EOL?
https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/

@BanzaiMan
Copy link
Author

BanzaiMan commented Jun 4, 2019

Well, this is an indirect dependency of a few of our deployment providers at Travis CI, and this unexpected change caused a few errors at run time (e.g., travis-ci/dpl#999). In an ideal world we will be jumping off to a newer Ruby version, but sadly we are unable to.

I understand that this is not an easy problem to solve. (And realistically, I don't know what it means to lower the Ruby requirement in a recent release.)

@weppos
Copy link
Owner

weppos commented Jun 4, 2019

@BanzaiMan this is an interesting issue though. I would have expected Bundler to not pick a dependency incompatible with a Ruby version you are working on. Isn't that the case?

In other words, if you are working in a Ruby 2.2 environment, and you run bundle, my expectation would be that Bundler should ignore 3.1.0 since 3.1.0 has an incompatible minimum Ruby version.

Do you agree?

@weppos
Copy link
Owner

weppos commented Jun 4, 2019

In fact, I am a bit confused. From the log at travis-ci/dpl#999 I can see you were trying to install 3.0.3

gem install public_suffix -v 3.0.3

which indeed is compatible with 2.1
https://github.com/weppos/publicsuffix-ruby/blob/v3.0.3/public_suffix.gemspec#L15

But then the next line the error is about 2.3 which seems to imply the code somehow tried to install 3.1.x.

Are you sure the code is properly installing the correct version?

@weppos
Copy link
Owner

weppos commented Jun 4, 2019

I can rollback the Ruby version as a courtesy in 3.x branch, (although I bumped a mini version on purpose). And release 4.x as the Ruby change, but if your code always tries to install the latest version, that we'll be back to square one.

@BanzaiMan
Copy link
Author

BanzaiMan commented Jun 4, 2019

Trust me, I do agree. Bundler can't do that, unfortunately.

I also understand that dpl needs improvements on this front as well.

We might just force public_suffix < 3.1.0 (which was done partially) on our side until we can move off Ruby 2.2.

@weppos
Copy link
Owner

weppos commented Jun 18, 2019

@BanzaiMan I found this on the Bundler docs
https://bundler.io/v1.13/whats_new.html

Gems that declare a required_ruby_version will now resolve correctly as long as your Gemfile contains a ruby declaration. If a gem cannot be resolved because of your Ruby version, the error will correctly indicate that your Ruby version conflicts with your other gem version requirements.

Are you able to set the proper Ruby version and confirm it works?

@weppos weppos closed this as completed in ae7cf82 Jun 25, 2019
@weppos weppos self-assigned this Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants