Preface

In this article, I’d like to introduces Finched Rails CLI that makes it a breeze to try out Rails without installing anything but Finch. Finch is an OSS CLI for building, running, and publishing Linux containers create by AWS. As long as you have Finch, you can quick start a Rails app only by copying and pasting a few commands. Finched Rails CLI is a fork of Docked Rails CLI and simply a Finch version of it.

NOTE: As of Jan 2023, Finch only supports macOS (on all Mac CPU architectures). For its future supportability of any other architectures, please watch Finch repo

Why I created Finched Rails CLI? It’s very simple. I don’t currenlty use Docker Desktop for managing Linux containers on my Desktop for its complexity and high resource consuming resason. I use Finch instead for it.

Quickstart

Please install Finch if you don’t have on your desktop

brew install --cask finch

Then copy and paste these below into your terminal:

finch volume create ruby-bundle-cache

alias finched='finch run --rm -it -v ${PWD}:/rails -v ruby-bundle-cache:/bundle -p 3000:3000 --entrypoint "" ghcr.io/yokawasa/rails/cli'

Now you’re ready to start develop Rails app using finched, the alias you’ve just created.

Let’s create a Rails project named weblog and start the Rails server as follows:

finched rails new weblog
cd weblog
finched rails generate scaffold post title:string body:text
finched rails db:migrate
finched rails server

Your Rails app is running, and you can check it on http://localhost:3000/posts.

open http://localhost:3000/posts

That’s it!

Enjoy developing Rails app with Finch!