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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rails-i18n work with rails7 #957

Closed
wants to merge 1 commit into from
Closed

Make rails-i18n work with rails7 #957

wants to merge 1 commit into from

Conversation

f6p
Copy link
Contributor

@f6p f6p commented Dec 16, 2021

EDIT: Temp Quickfix

In your Gemfile replace gem 'rails-i18n' with gem 'rails-i18n', git: 'https://github.com/f6p/rails-i18n.git', branch: 'rails7-hotfix'. See my comment below.

Original PR message

Rails7 was released today. gemspec has hardcoded depndency rails < 7. As a consequence bundler can resolve dependencies on release candidates but not on stable release.

PR is similar to #955 but does two more things. It updates Gemfile.lock (I ran specs - one translation seems to be missing) and fixes invalid hash syntax in rails/ordinals (that caused errors when testing application with rails-i18n dependency).

It fixes #954, replaces: #955.

Cheers
馃嵎

@f6p f6p mentioned this pull request Dec 16, 2021
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = '>= 1.8.11'

s.add_runtime_dependency('i18n', '>= 0.7', '< 2')
s.add_runtime_dependency('railties', '>= 6.0.0', '< 7')
s.add_runtime_dependency('railties', '>= 7.0.0', '< 8')
Copy link

@uxxman uxxman Dec 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since everything still works with rails 6, I think we should only relax the upper limit and not restrict the lower one i.e.

s.add_runtime_dependency('railties', '>= 6.0.0', '< 8')

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, supporting both Rails 6 and 7 will help with transitioning.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@f6p can you please do this small change?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should just be >= 6 so that it's compatible with future versions of rails in an "evergreen" setup

@sunny sunny mentioned this pull request Dec 16, 2021
- Add runtime railties 7.0.0 dependency.
- Bump version number to 7.0.0.
- Update Gemfile.lock.
@f6p
Copy link
Contributor Author

f6p commented Dec 16, 2021

I removed ordinal changes as now there is a better PR for that (#958).

@f6p
Copy link
Contributor Author

f6p commented Dec 21, 2021

Guys as a temporary quickfix we are using this in our Gemfile:

gem 'rails-i18n', git: 'https://github.com/f6p/rails-i18n.git', branch: 'rails7-hotfix'

Its my branch that merges #958 and this one (#957) and works well for us.

No need to wait for official release (you can switch to official gem at later time). Hope this helps at least some of you.

@morgoth
Copy link
Contributor

morgoth commented Dec 22, 2021

@f6p sure, but can you please do this small change in this PR? #957 (comment)

@davidwessman
Copy link

I used @f6p commit and added the proposed change to support Rails 6 but opened in #962.
I kept @f6p as author as well.

@MoskitoHero
Copy link
Collaborator

Closing this in favour of #962

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 this pull request may close these issues.

railties dependency and rails 7 compatibility
7 participants