Ruby version management can be quite fiddly. All Ruby developers need multiple Ruby versions installed, as different projects may use different Rubies. For the past few years, I’ve used rbenv along with ruby-build to install and manage Ruby versions. They’re good tools, but I was using them more out of inertia than anything else. When it came to building Mimas , which is a tool to deploy Ruby apps…
Deploying Ruby apps to a server 1. Server setup for Ruby web applications 2a. Serving Ruby apps with Caddy as a reverse proxy 2b. Falcon as a web server for Ruby applications 3. Zero-downtime Ruby deployment without Docker In the final part of this series, we’ll build upon the setup created in Part 2a and close the loop by deploying code from our machine to the server. Part 2a covered the setup to…
Deploying Ruby apps to a server 1. Server setup for Ruby web applications 2a. Serving Ruby apps with Caddy as a reverse proxy 2b. Falcon as a web server for Ruby applications 3. Zero-downtime Ruby deployment without Docker In the previous post , we covered how to install and run Caddy, and then use it as a reverse proxy to serve a Rack app, and discussed why this is the conventional configuration.…
Deploying Ruby apps to a server 1. Server setup for Ruby web applications 2a. Serving Ruby apps with Caddy as a reverse proxy 2b. Falcon as a web server for Ruby applications 3. Zero-downtime Ruby deployment without Docker In this post, we’ll cover how to serve a Rack app using Caddy as a reverse proxy. We won’t be covering how to deploy code to the server as yet. We’ll create the Rack app on the…
Deploying Ruby apps to a server 1. Server setup for Ruby web applications 2a. Serving Ruby apps with Caddy as a reverse proxy 2b. Falcon as a web server for Ruby applications 3. Zero-downtime Ruby deployment without Docker The ease of using Heroku and other similar platforms means a generation of developers, including me, have never really needed to setup and manage servers during our career. As…
When Turbo 7 and its Rails integration turbo-rails dropped in late 2020, it became easier than ever to use Action Cable. With just a few lines of code, you could broadcast updates to the client over WebSockets and build all kinds of real-time interactivity with ease. This ease does come with a trade-off. There’s a security pitfall that’s all too easy to fall into. By default, WebSocket connections…
After about 3 years in hibernation I’ve finally resurrected my app Scattergun . It’d been on pause for so long due to the joys of EU VAT (also known as Sales Tax or GST in other countries). Why does this affect me? I’m based in the UK which is (sadly) no longer in the EU, but these laws affect everyone selling to consumers the EU, no matter where you’re located. When selling digital services to…
I got my first programming job right out of university in 2014. I worked full-time for 5 years before taking a sabbatical, and then going freelance in 2021. Freelancing offers me a cadence of client work followed by unbooked time. I usually work with long term clients so a bit of downtime after a contract ends is very welcome. This allows me an opportunity to upskill. It’s also when I blog a whole…
If you’ve ever used Rails, you’ll almost certainly have created a database migration and seen the below syntax in the class declaration: class CreateUserTable < ActiveRecord :: Migration [ 7.1 ] def change # ... end end I’d never understood how the [7.1] in the superclass definition worked, and never really questioned it to be honest. I thought it was a fancy Ruby language feature that I didn’t…
I’ve recently dipped my toe into deploying Ruby and Rails apps to a VPS, mainly to improve the deployment story for Bridgetown . No PaaS is all the rage with Rails 8, and server management is a huge gap in my skillset anyway so I figured it’s worth investing some time into it. Using password authentication to SSH into servers is considered insecure . The preferred method is to use SSH Key Pairs…