Category: Rails

Beyond the vibe

I have a Rails app that’s stuck on Rails 6 because there are gems that won’t update and run with later Ruby and Rails versions.

They were an attempt to do DDD style view/display and are all over the views and controllers in the codebase. Not my choice, I contracted someone else to do the web app cos I was doing the mobile piece and they went with it.

The IDE I’m using uses Claude, which is supposed to be one of the best AIs for coding.

It generated a list of things that need doing, but makes a very poor to zero job of actually doing the refactoring, it also can’t get the tests working so I’m gonna have to do them myself.

On a brown field app, with major things that need doing the value of this is at best questionable. Sometimes it refactors the views, sometimes it doesn’t, it’s an inconsistent pain.

Why am I not surprised?

You can vibe something new, but the other 99% of the life of a piece of software, maintaining it, seems to be little use.

And hallucinating 20 lines of code when I start typing is becoming very irritating. I don’t think I’ve mashed the Esc key anywhere near as much before, even when I used Vim as my main editor.

It’s been useful on a greenfield project I’m doing in my own time, but even there the hallucinations are annoying, and that project has very locked down tests so I know the AI isn’t breaking things.

My Application Cable system won’t send messages

Well, this was fun. The app I’m working on had background message sending that was then taken out for various reasons.

I just couldn’t get it working again and the original dev has gone off to pastures new.

After a lot of head scratching I created a Rails app with nothing in it and then added the Application Cable stuff to see if it would work.

Same problem:

  • Browser fires up
  • Channel opens
  • Sending messages from the console does nothing

Couldn’t see the activity in the dev environment, much rubbing of chin ensued.

Then, dear reader, I decided that the dev config that used an adapter called async could maybe be replaced with the same as the production one that uses Redis.

  • Install Redis
  • Create the config files
  • Start it up
  • Change the config/cable.yml file so it uses Redis instead

And it worked! So, whatever that async adapter is supposed to do it doesn’t do it.

The target system uses Docker and I think Redis is already in the mix, but at least I have something to check now.

Go me.