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

Incompatible with Ruby < 2.3 #9

Open
etagwerker opened this issue Apr 20, 2019 · 4 comments
Open

Incompatible with Ruby < 2.3 #9

etagwerker opened this issue Apr 20, 2019 · 4 comments

Comments

@etagwerker
Copy link
Contributor

etagwerker commented Apr 20, 2019

Hey @jnraine,

It seems that the gem is incompatible with some versions of Ruby (< 2.3)

$ gem install ten_years_rails
Fetching: concurrent-ruby-1.1.5.gem (100%)
Successfully installed concurrent-ruby-1.1.5
Fetching: i18n-1.6.0.gem (100%)
ERROR:  Error installing ten_years_rails:
	The last version of i18n (>= 0.7, < 2) to support your Ruby & RubyGems was 1.5.1. Try installing it with `gem install i18n -v 1.5.1` and then running the current command again
	i18n requires Ruby version >= 2.3.0. The current ruby version is 2.2.0.

Everything works fine with Ruby >= 2.3.0:

$ rvm use 2.3.1
Using /Users/etagwerker/.rvm/gems/ruby-2.3.1
$ gem install ten_years_rails
Fetching: rest-client-2.0.2.gem (100%)
Successfully installed rest-client-2.0.2
Fetching: ten_years_rails-0.2.0.gem (100%)
Successfully installed ten_years_rails-0.2.0
Parsing documentation for rest-client-2.0.2
Installing ri documentation for rest-client-2.0.2
Parsing documentation for ten_years_rails-0.2.0
Installing ri documentation for ten_years_rails-0.2.0
Done installing documentation for rest-client, ten_years_rails after 4 seconds
2 gems installed

I see a couple of options to solve this problem:

  • Remove dependencies (maybe active_support and action_view are not really necessary and we can find alternative solutions)
  • Define spec.required_ruby_version in the .gemspec file

What do you think?

@jnraine
Copy link
Contributor

jnraine commented Apr 22, 2019

I like both options! If we can easily remove dependencies, I’m all for it. One thing to consider is that because this is a repo about Rails upgrades, it may not be worth removing dependencies that are required to use Rails.

As for support for Ruby 2.3, since it is EOL, it may be worth requiring something newer.

@etagwerker
Copy link
Contributor Author

As for support for Ruby 2.3, since it is EOL, it may be worth requiring something newer.

I tried to use ten_years_rails in a workshop and 50% of the folks had issues installing the gem. I think there are still a lot of applications out there that are using Ruby < 2.3.

I'd really like it if we could count on ten_years_rails for applications that might be using Rails LTS or an EOLed Rails version but want to start using this gem to start gradually upgrading dependencies.

This might be a very specific problem but we run into it very often with our clients at @fastruby.

For now, the short-term solution could be to set spec.required_ruby_version to Ruby >= 2.3 and revisit this issue later.

@jnraine
Copy link
Contributor

jnraine commented Apr 23, 2019

You make a good point and have convinced me! The nature of this gem may mean it is particularly useful to support older versions of Ruby.

Do you know what it would take to support versions earlier than Ruby 2.3?

etagwerker added a commit to fastruby/next_rails that referenced this issue Apr 27, 2019
It improves the configuration based on what we discussed in clio#9
@etagwerker
Copy link
Contributor Author

etagwerker commented Apr 28, 2019

@jnraine I'm not sure, but #14 could be the start of that. I removed activesupport as a dependency because one of its dependencies (if I remember correctly, i18n?) required Ruby >= 2.3.0

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

No branches or pull requests

2 participants