Description
(Originally opened on the repository causing the issue rails/rails-dom-testing#100)
Steps to reproduce
- Install any version of Ruby 2.5
- Install Rails 5.2
docker run -it ruby:2.5.9-buster bash
gem install rails -v '5.2.7.1'
Expected behavior
Ruby on Rails should install successfully
Actual behavior
Ruby on Rails fails to install and shows this error:
ERROR: Error installing rails:
The last version of nokogiri (>= 1.6) to support your Ruby & RubyGems was 1.12.5. Try installing it with `gem install nokogiri -v 1.12.5` and then running the current command again
nokogiri requires Ruby version >= 2.6, < 3.2.dev. The current ruby version is 2.5.9.229.
This is due to actionview
requiring rails-dom-testing
, which requires nokogiri ">= 1.6"
. Since nokogiri release 1.13 Ruby 2.5 is no longer supported.
System configuration
Rails version:
5.2.7.1
Ruby version:
2.5.9
Notes
I know Ruby 2.5 reached EOL but I want to run a legacy app and gradually walk it through the upgrade process.
Also Rails 5.2 gem spec says Ruby >= 2.2.2 is required, so is it still expected to work for Ruby >= 2.2?
What's a good way to do solve this issue on my end?
I thought of forking rails and rails-dom-testing but I don't think I can specify a git source in a gemspec file.
Thanks!