Skip to content

Instantly share code, notes, and snippets.

Host to Host a Rails App on a Home Server

Hosting services like Heroku and Amazon EC2 are nice. That is, until they cost money. Some things are worth running on your own hardware, especially when the cost and Terms of Service requirements outweigh the expense of rolling your own hosting.

I am writing this because I recently had to figure all this out in order to host a personal blog off a Raspberry Pi, and I thought I'd share what I learned. This guide assumes that you already know how to install Ruby and you know how to use Rails. If you don't, look those up first before coming back to this guide.

Prerequisites

  • Ruby >=2.0
  • Rails >=4.0
  • Nginx
@rubymiler
rubymiler / 00_README.md
Created November 26, 2022 04:41 — forked from alexdean/00_README.md
changes in ActiveModel::Dirty tracking during ActiveRecord lifecycle callbacks in rails 5.2

This script reports on how the behavior of ActiveModel::Dirty methods have changed during various lifecycle callbacks in ActiveRecord instances.

The report shows the output of various ActiveModel::Dirty methods within a number of different callbacks, under different versions of ActiveRecord.

The script used to create this output is below, and can be used/modified to get information on other dirty-state methods.

fun stuff

this script was kinda fun to put together. i got to poke in a few areas of ruby I don't typically touch.