Skip to content

Ruby 3 & Rails 7 support - #57

Closed
RDIL wants to merge 21 commits into
Genius:masterfrom
RDIL:reece/new-rails
Closed

Ruby 3 & Rails 7 support#57
RDIL wants to merge 21 commits into
Genius:masterfrom
RDIL:reece/new-rails

Conversation

@RDIL

@RDIL RDIL commented Aug 26, 2025

Copy link
Copy Markdown
Member

Blocked on #55, #56

Some things I had to do:

  • Add GitHub actions setup, remove Travis
  • New Rake setup! (see below)
  • Add rails 7 test app (it's basically stock Rails 7, but stripped down a bit to exclude fancy things like sprockets and ActiveStorage)
  • Make rails 5 test app have less dependencies so it's more similar to the other apps

Minor restructuring

Previously, we symlinked db for each test app to a common folder. On new Rails versions, it complains if the migrations don't have an ActiveRecord migration number, and also the schema keeps getting clobbered, depending on which suite you ran last. To make things better, we now have per-rails-version schemas, but still have symlinked migrations.

Review notes

The only file marked as generated that really needs a review is this one: https://github.com/Genius/modern_searchlogic/pull/57/files#diff-aac10e1afccb13652da4e602b9ce73d61f4fad608c156f1258df219a037896bf - it patches new Rake to work with Rails 3. The method is not relevant so we can just stub it.

Rake setup

Tasks:

  • install_appraisals - Installs all appraisals for local dev
  • rspecX (where X is 3/4/5/7), to run tests against that rails version

RDIL added 20 commits August 22, 2025 18:33
This will make the process a lot easier
So that you can actually get stuff done!!
In a test environment, or when creating/seeding the database, there are no tables defined in ActiveRecord. This causes an edge case where, if *any* `method_missing` is called (and it gets to MSL), an error will be thrown. This is because accessing `columns_hash` or `column_names` will cause a query to be made that will fail (as it expects the table to already be present in the database).

For getting caught up on the memes, see the following:
- Genius/Rap-Genius#15200
- Genius/heroku-buildpack-ruby#14

Feel free to backport this to Rails 2 - seems pointless since it's On The Way Out (TM) (as it has been for the last decade, but who's counting?!)
idk about the schema change but i'ma roll with it
idk about the schema change but i'ma roll with it
We're skipping rails 6 because I do not care enough
Same memes, different day. It's not a real model, so it shouldn't crash on column type discovery, since it has no columns.
Per-rails-version migrations were a bad idea, but per-version schemas was not. As such, we can have our cake and eat it too.
@RDIL RDIL closed this Aug 27, 2025
@RDIL
RDIL deleted the reece/new-rails branch August 27, 2025 03:17
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.

1 participant