I also went to every hackathon I could - not to win, but to meet other programmers, to sharpen my skills, to learn how to finish something under pressure.
After a few months I started getting contract gigs - nothing fancy but paid work. And a funny thing happened. I loved it. Loved programming. Wished I'd been doing it for the last decade in go-to-market roles. Key was I never let up learning. I read everything. Watched every video I could. Tried katas, built any app I could think of to build. Shortly after that I was able to get full-time gigs.
Nowadays I'm in a great company, doing awesome work and loving every minute of it. Your instincts are right. If you're genuinely dedicated to it you can get your head down and learn the stuff you mentioned. Plenty of folks hiring in the UK for ruby/rails. While it's lost its luster for much of the HN crowd, it's only increased in its broader adoption, and the number of jobs hiring for those skills have multiplied far beyond the available talent.
Go for it. Good luck.