OK I realised I could have been live-tooting this the whole time instead of spamming groupchats 😂
Solo #Ruby Hackathon: day 7.
Context is I've been working on upgrading Levelfly, an open-source Learning Management System https://github.com/neuronic-games/levelfly/
The codebase dates back to 2011, with #Rails 3.1.
In 2021, I upgraded it, getting as far as Rails 4 and #Ruby 2.4.
That same year, @autonomic colleage @roxxers and I containerised it to move it from Heroku to a Docker Swarm deployment (using @coopcloud ).
Since then, Levelfly has just had a couple of critical infrastructure fixes… meanwhile Rails 4 hasn't had security updates since 2017¹, and Ruby 2.4 hasn't had any since 2020².
Most satisfying thing so far has probably been finally understanding RSpec enough to be useful – specifically getting my head further around the difference between fixtures, seeds, and factories.
(And then completely ripping out the fixtures lol)
Part of me regrets not finding a way to test S3 sooner, because file uploads have always been a big source of bugs in Levelfly, and I built up a small version-hell nightmare for myself by not checking any of that until deep into #Rails 6.
But maybe this was an OK plan: by the time I got to it, I had a lot of practice with dealing with gem dependency issues, writing #RSpec, and writing tests that require other services – all of which turned out to be crucial to getting it going.
#Ruby 3.2 kinda works… but seemingly several gems in the bundle use the deprecated File.exists? method (hot take but was this alias really worth removing?).
Monkeypatching third-party gem to the rescue! https://idogawa.dev/p/2023/01/file-exists-ruby.html
While I wait for `bundle update rails` – probably the most dicey step was a #Rails upgrade that required completely deleting `Gemfile.lock`.
File under "very confused that this worked".
JOHN SUMMIT - Mayan Warrior - Burning Man 2025 (SPOTIFY PLAYLIST IN DESCRIPTION) SPOTIFY PLAYLIST: https://open.spotify.com/playlist/0Uf13iNASSOszBjoo8icEw?si=fc74209d69e54c53
Now a real head-scratcher: "DEPRECATION WARNING: Passing instance variables to `render` is deprecated."
Not as many hits on th'internet as for other deprecation warnings I've run into.
I did find a blog post about it¹ but now I'm curious why I didn't see more warnings? (Could just be limited test coverage lol 🙈)
¹ https://andycroll.com/ruby/dont-use-instance-variables-in-partials/
Back in the saddle!
#Rails 7.1 seems to be working fine – I had to upgrade rspec-rails, which seemingly changed the behaviour of the "as" parameter… but, plot twist, I didn't need to have ever added that in the first place! 😳
Solved this one in 13 minutes on the subway home, actually kinda great conditions for it surprisingly?
A non-screen break and a walk to let my subconscious mull the problem for a bit.
Then, a short time limit and unreliable internet meant I had to skip the usual steps of "searching the error message" and "reading the online documentation" and go straight to the source code – which by now is mostly making sense.