Brief aside, I tried to use the fake-s3 Rubygem but the original is deprecated and the last-active fork a) seems abandoned too and b) won't launch without a licence key, is this even allowed in Rubygems.org?! https://supso.org/projects/fake-s3/register
Purchase License for Fake S3

Current status: I borked tests by removing Pusher config from the test environment, thought that was handled automatically by pusher-fake, it is not, need to RTFM.
(Live-toot megathread inspired by @foone 🤘)
OK Pusher is happy again, #Ruby 3.1 upgrade seems to have gone smoothly… now how about #Rails 7? 👉👈
#Ruby dependency hell …. well, at least purgatory … once again – acts-as-taggable-on needs an upgrade to be compatible with activerecord > 6.2, but that seems to want a zeitwerk upgrade, and THAT seems to want Ruby 3.2. Good thing I got rbenv working! 😅

#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

File.exists? and Dir.exists? on Ruby 3.2 Workaround

File.exists? and Dir.exists? were removed in Ruby 3.2. How to fix.

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".

#Rails 7.0 🥳 Now onto #Ruby 3.3. Only one (major) version of Ruby and two versions of Rails left! The end is in sight!
JOHN SUMMIT - Mayan Warrior - Burning Man 2025

JOHN SUMMIT - Mayan Warrior - Burning Man 2025 (SPOTIFY PLAYLIST IN DESCRIPTION) SPOTIFY PLAYLIST: https://open.spotify.com/playlist/0Uf13iNASSOszBjoo8icEw?si=fc74209d69e54c53

SoundCloud

Woohoo that's #Ruby 3.3!

Are We Ready For #Rails 7.1? Let's Find Out!

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/

Don't use instance variables in partials

Containment is key

Andy Croll
Trying to rush through #Rails 7.1 upgrade before I have to go AFK for the day 🏃🌬️.
Rabbithole mental state update: I've started anthropomorphising the #Ruby gems (and feeling bad torturing them in probably very-unexpected version combinations!)

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.

Now, scanning for deprecation warnings ahead of the final(🤯🤯🤯) round of upgrades, to #Rails 7.2 and #Ruby 3.4.
Ran `git reset --hard HEAD^` with uncommited unstaged changes 😭 (luckily not too many, and the key ones were in my vim history)
Making a mental note to add a wrapper script to git to make it bail in these conditions – I would never intentionally drop everything with `--hard`, I would use `checkout`.
Oh no, this is pretty late in the game to be finally paying attention to `new_framework_defaults` 😳
Wow and not only that, I'm not sure I remembered to run `rails app:update` after every Rails upgrade 🫠
Luckily merging the configs is going "OK" so far. Grr so frustrated to be learning yet more things 😾 (not really)
OK the universe didn't punish me too harshly for these mistakes 😇 #Rails 7.1 has the most configuration changes yet! And also some database migrations, exciting!
Wow so far only TWO config options which needed non-default values, all the way from #Rails 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 7.0, and 7.1 😲
Having the funniest issue where browser tests only run if I switch to a specific GNOME workspace, then away from it, then back to it again? Otherwise I get an HTTP timeout 🤡
If your application has a `--color` flag, be like #Rspec, also support `--colour` as an alias, absolute praxis imo
"If it upgrades, upgrade it. If it doesn't upgrade, release the version constraint" is the "If it moves, salute it, if it doesn't move, pick it up" of #Ruby
(Specifically of debugging third-party packages causing deprecation warnings, praise be to #Rspec's `--backtrace` option and ` config.active_support.deprecation = :raise`)
OK I was wrong earlier, my actual favourite part of this process was running into an extremely-handy-looking #Ruby gem… and it's made by my university (college) housemate 🤯

Oh my days we're finally there!

#Ruby 3.3.9, #Rails 7.2 😎

Technically I could have stopped at #Rails 7.1 but it's only getting security updates another week.

And technically I could go to #Ruby 3.4 (3.3 is only supported another 6 months) and Rails 8 (7.2 is supported another 10 months)… but I need to start climbing out of this rabbit hole!

Just some final deployment configuration tidy-up, some manual testing, and then I'll be ready for the all-important "declare victory and run away" step 😌
➜ bundle-audit
No vulnerabilities found
Wow and `ruby-lsp` is working now, immense
Of course there's a completely haunted #Docker build issue, right on the home straight 🫠
Yep that was a real wild last problem to run into… "solved" with a new environment variable that probably summoned a demon.
And it's done! Docker image built, docs tidied… ready to set up a staging server and test this out 🤘
And, with some fresh inspiration, back to my solo hackathon, Day 8 👷
Since last toot yesterday I cracked open a barrel of #Rubocop plugins – this really is the most ergonomic linter I've used 🤩 – and made a lot of headway tidying up the #RSpec tests.
So, today, "what is left to do before this could maybe be deployed?"

Firstly: test coverage. We're currently at around 40% (it's varied up and down about 3% between #Rails / #Ruby versions, which has been interesting!)

I'm not shooting for 100% – I've made the mistake before of making tests too brittle with respect to changes, and at the end of the day 100% lines covered doesn't necessarily mean 100% of functionality covered anyway.

But some of the key models and controllers are very minimally tested, which feels worth improving given the scale of the changes.

First order of business is to see if #RSpec or #SimpleCov can tell me which methods (as opposed to lines) are covered – I'd be happy enough for now if each controller and model method is at least executed.

I'm also interested in setting up #Coveralls (maybe there are other similar services, but this is the only one that seems to have a Drone Plugin¹ for it already).

I'm not currently sure if if it makes sense to have coverage enforced by a CI step – but at least making this data more visible seems like a great start (and personally is helping the work I've done over the last week feel less abstract)

¹ https://plugins.drone.io/plugins/coveralls

Drone Plugins - Coveralls

This plugin can upload coverage reports to Coveralls.

I'm 90% sure that extending the test suite will smoke out other problems introduced by #Rails / #Ruby upgrades that I hadn't caught yet.

Of course, building a more comprehensive suite back on day 1 (Rails 4.2 😬) would have mitigated this – but I was really struggling with dependencies on such old versions of Ruby and Rails, keen to start making progress – and I was satisfied that 40% coverage was better-enough than 0% to get on with it.

After that, I want to focus on the #Docker image.

Somehow – despite applying a couple of Dockerfile tricks I've picked up since my last #Levelfly containerisation work back in 2021 – the image has ballooned from 400MB to 1.8GB, and I'd like to get that back down to size.

Part of this will likely involve publishing separate "development" and "production" images, to save new project contributors from a docker build process.

Woohoo, found my first bug thanks to extended #RSpec coverage 🥳

No luck getting #Simplecov to show me a list of uncovered methods yet, though 🤔

Filled with regret I didn't save my ornate vim macros to convert #Rails deprecated finder methods into the current ones 😭

Search query "rails jobs worker"

🦆 Including results for railroad jobs employment

I mean, maybe?

Right, after some much-needed rest, Back 2 Levelfly

#Ruby #Rails

Some updates from the last few days:

#RSpec interactive debugging with #Neovim: I tried a lot, I failed a lot.

I got this working for other languages (#Python and #CSharp) and it was a HUGE help, taking away one of the main things I need to leave my editor for.

But something is blowing up and I'm still relatively new to Neotest, DAP, and the various plumbing between them and the test runners.

I'm liking how the #RSpec tests are shaping up overall though.

I'd be really interested to get some review from someone with more experience; I did find a few examples of "request" specs (which is the main layer I've decided to start with) around, but there seem to be several different taste preferences going on.

So far, having a "context" for each combination of HTTP verb + endpoint is working out reasonably, and then separate blocks to test unauthenticated / unauthorised / success

One downside of setting myself the stretch goal of "adding #RSPec tests for all URL routes" is that there are a LOT of them 😅

(`rails routes` says 303)

This is of course making this task take forever (~15 hours' work to improve test coverage from ~40% to ~65%).

But, more also-importantly, it's ruining my "lines of code deleted" metric, I have added over 2000 lines of specs alone 🙈

#Levelfly #Ruby / #Rails upgrade 2026 update: we Put Together a team! 🤩

Delighted to be linked back up with one of the CUNY / BMCC academics who originally initiated (and is still using) Levelfly, and a seasoned tester & project manager from Neuronic. We're full-tilt to try and get this update finished in time for the next cohort of students who will be using the software soon.

As expected, the ~65% #RSpec test coverage meant that there have been several issues which came up during manual testing, including some very pleasantly head-scratching ones 🧠
e.g. Yesterday I Learned about #ActiveRecord's overloading of the #Ruby "shovel" ("<<") operator, and a couple of weeks ago I started a foray into #Rails YAML serialisation, which seems to have changed quite a bit between versions, leading to inconsistently-formatted data in the database, and the exciting prospect of writing a data migration that runs raw SQL queries 😵
levelfly/app/views/user_mailer/course_private_message.text.erb at chore/3wc/ruby-rails-upgrade · neuronic-games/levelfly

Level Up Learning! A friendly Learning Management System - neuronic-games/levelfly

GitHub

WOW IT IS DONE!!!111

https://github.com/neuronic-games/levelfly/commit/677e6d3959d9563a63942c7c3b16b1b8524726ef

497 files changed, +12137, -8793

Now there are ~5 days to test before the next cohort of students is let loose on the platform 😌

#Ruby #Rails

Merge branch 'chore/3wc/ruby-rails-upgrade' · neuronic-games/levelfly@677e6d3

Level Up Learning! A friendly Learning Management System - Merge branch 'chore/3wc/ruby-rails-upgrade' · neuronic-games/levelfly@677e6d3

GitHub

Almost 15k lines of #Ruby, bodily dragged into the present, catching up on ~6 years of updates.

Test coverage increased from "uhh basically nothing" to 65%.

And, thanks mostly to #Rubocop, the code is way neater and more maintainable now.

We even accidentally fixed some longstanding bugs!

Hugely excited for the next major dev task: moving away from "Amazon" "Web" "Services" for file hosting.