Tag: #rails

Deploying with Kamal

Intro I’ve been hosting 1500cals.com on fly.io as I wrote about previously, and frankly, its really great. Particularly to get a Rails app up and hosted in minutes, harkening back to the old Heroku days when it was the defacto answer for almost instant free Rails hosting. However, last year when DHH introduced Kamal my interest was piqued! He described it as A simple yet battle-tested deployment tool extracted from our cloud exit, which features...

A First Look at Solid Queue and Mission Control Jobs

Background Jobs Background jobs are something most web developers need to start reaching for whenever there’s a long running task, or something outside the scope of a typical web request. One classic example, and the one we’ll use as an example today, is sending email. Of course Rails makes it easy to send emails with ActionMailer, and you can send an email asynchronously to a user in response to them clicking a ‘forgot email’ link...

Rails - The One Person Framework

History I’ll make no bones about it. I love Ruby and I love Rails! I was lucky to see DHH’s seminal Ruby on Rails demo video How to build a blog engine in 15 minutes in 2005 while I was working at a startup in San Francisco. At the time I was leading a team building J2ME, Brew and WAP mobile ringtone apps, with the backend all implemented with Java Servlets and JSP running on...

From Idea to App Store in 2 hours!

OK, I’ll admit it, “From Idea to App Store in 2 hours” was mainly to get you to click and a riff on my friend - and Turbo Native expert - Joe Masilotti’s excellent post “Idea to App Store in 7 days”, but hear me out. This is a true story about the power of Ruby on Rails and Turbo Native apps which was made even more apparent to me this weekend! Since my little...

1500cals in the iOS App Store!

1500cals is now in the iOS App Store! Quick Announcement: I’m thrilled to announce that just in time for those New Years resolutions, 1500cals passed certification with Apple first time, and is now available to all for FREE in the iOS App Store! Check it our and download it here: https://apps.apple.com/us/app/1500cals/id6470238113 I started building this just for myself to solve the annoyances I had with other calorie counting weight loss apps on my journey to...

1500cals iOS App Launched!

New iOS App Very excited to announce 1500cals for iOS is now available via Test Flight! I previously wrote about my journey to lose 50kg (110lbs) last year, the tools I used and then about the new app I was building to help plan meals and track exercise. I built this app for myself as I really wanted to use all the great features in Rails 7, Stimulus and Hotwire. The other key piece in...

New App Sneak Peek

What’s New? I’ve written before about my weight loss journey last year where I lost 50kg through mostly watching what I ate and starting to exercise. The main “trick” I uncovered is simply to plan meals ahead. It sounds boring, it sounds annoying, but really its such a tiny effort for such outsized and life changing rewards that it should be a no-brainer. The existing tools I found were more focused on tracking after eating...

Spectacular Rails World

Rails World 2023 I’m just home from the inaugural Rails World conference in Amsterdam, and the word that keeps popping in my head to describe it is simply “Spectacular”. In my role at Cookpad I’ve been fortunate to be the driving force behind our sponsorship and support of over 50 Ruby and Rails events around the world in the last ~10 years, and it’s something I’m immensely proud of, but what I just experienced was...

Get Started with Strada! A First Look on iOS

Tada! I mean, Strada! If you’ve been following along, you may know I’ve been getting quite interested in Turbo Native iOS for Rails. If you haven’t been following along.. why not! Anyhow, to recap, Turbo Native enables rapid development of hybrid apps, by wrapping a Rails 7 turbo-enabled webapp in a native iOS or Android shell. It really is fantastic and exposes so much more than just a simple web browser. The big news yesterday...

Active Storage CDN with Cloudfront and Subdomain in Rails

What we will be doing This post assumes you’re using Active Storage in a Rails app and want to switch to using a CDN. I’m writing it down because I spent all day figuring this out yesterday, and couldn’t find a definitive “how-to” article anywhere! In this article we will: Switch Active Storage to “Proxy Mode” Get an SSL cert for your sub-domain if you need one. Add a Cloudfront distribution in front of your...

Password-less SwiftUI Native Auth with Turbo iOS

Overview This post continues on from my last, where we implemented Password-less Authentication in Rails, which powers the backend to the app in this post. You can get the finished Source Code on GitHub or if you prefer, follow along below from scratch. What we’ll build In this article we’ll build a Turbo Native iOS app in Swift that wraps our Password-less Authentication Rails app from Part 1, enhancing it with native Swift UI authentication...

Password-less Auth with Rails

Overview I much prefer websites and apps that offer a way to sign in without needing a password purely from a usability standpoint, but there are some great benefits for developers too, for example: automatically confirm the user’s email address no need for sign in and sign up flows no need to implement “forgot password” Based on this, for a recent project I implemented password-less authentication for the web. Since this project benefits from HealthKit...

Learning to Fly... with Fly.io

Deploying a Rails app I’ve historically always reached for Heroku to deploy little apps and side projects when I wanted to push them out for others to see and use. When Heroku ended their “free” plan, several new platforms seemed to emerge or old alternatives gained renewed interest, such as render, hatchbox, fly, digital ocean and many others. In this post I’m going to focus on Fly.io which I’ve used a couple of times and...

Turbo Native Quick Start

Rails 7 and Hotwire As I mentioned in a previous post, Rails 7 is a real inflection point in terms of capabilities out of the box, the efficiencies and frankly a joyful development experience. You truly can get the speed and interactivity of a single-page web application without having to write any JavaScript. High-fidelity hybrid apps Turbo Native is a further part of the Hotwire ecosystem that enables development of hybrid apps, by wrapping a...

Dynamic Search with Hotwire

Hotwire is an incredible framework for making rich, responsive, and snappy client experiences with the minimum of complexity. It leans on Rails standard concepts of convention over configuration and omakase to deliver a simple developer experience without any trade off to performance or capabilities. In this example I’ll describe how I added a very simple dynamic search feature to a side project I’ve been working on, with a trivial amount of code and effort. The...

Rails 7 - Talk about a Revolution

Love, Love Me Do I loved Rails the instant I watched DHH’s “How to build a blog in 15 minutes with Rails” around 2005. To set the scene, at the time I was working at a ringtone startup in San Francisco (remember ringtones?!). The business was doing amazingly well - our first million dollar ringtone was 50 Cent P.I.M.P. in all its polyphonic glory - and we had a small dev team delivering a pretty...

Alexa Custom OAuth Account Linking with Rails

Custom skills with Amazon Echo devices provide a great way for users to interact with your product or service by voice. This is something particularly true at Cookpad where users are cooking, so their hands are often busy or messy with ingredients. Voice provides an excellent way to interact with a recipe while cooking. Conversely, searching by voice is really not a great experience. We’re all used to searching websites and perusing lists of results,...