
Learn Ruby on Rails through Screencast Tutorials on GoRails
with Nick Janetakis and Chris Oliver
Running in Production · Nick Janetakis
Audio is streamed directly from the publisher (runninginproduction.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
In this episode of Running in Production, Chris Oliver goes over how he builds and deploys his screencast tutorial platform called GoRails. The site handles about 2 million page views a year on a single $20 / month DigitalOcean server. GoRails has been up and running since 2014.
There’s a lot of useful nuggets of information in this episode around keeping a pulse on similar communities that you’re in. For example, Chris took a lot of inspiration from Laravel when it came to implementing the billing code for GoRails. Spoiler alert: Rails does scale.
Topics Include
- 1:42 – Avoiding burn out by having a 2nd project to work on
- 3:11 – Scratching your own business needs is a healthy way to drive a project
- 4:13 – GoRails gets 2 million page views a year (~500k unique visitors)
- 4:36 – Looking at Laravel for inspiration when it comes to batteries included
- 7:12 – Talking a bit about Bootstrap vs Tailwind CSS
- 9:47 – Being aware of developer driven vs user driven features
- 10:24 – GoRails uses server side templates with Turbolinks
- 13:11 – Using Turbolinks has been good but there are gotchas
- 14:16 – Flatpickr is a really nice datetime picker with minimal dependencies
- 14:43 – Websockets and Action Cable aren’t used in GoRails but it is with Hatchbox
- 17:03 – Introducing just enough JavaScript complexity as needed, but no more
- 18:54 – Trying to avoid heavy client side JS for performance issues on low end devices
- 20:09 – GoRails is using Rails 6.x with Webpacker but it’s not using Sidekiq
- 22:31 – Docker isn’t being used in development or production to keep complexity low
- 23:40 – PostgreSQL is used as a primary database along with Redis for caching
- 25:13 – Using the strong migrations gem to help make production migrations less scary
- 28:23 – Hopefully more advanced database related features make its way into Rails
- 29:31 – The entire GoRails site is hosted on a single $20 / month DigitalOcean server
- 30:24 – Making extensive use of multi-level caching helps a lot for performance
- 31:57 – Passenger is being used as the web server (it’s an nginx module)
- 34:15 – Let’s Encrypt is still being used on the server for end to end encryption
- 36:28 – Errbit is being used for catching errors which gets emailed back to him
- 37:47 – Keeping tracking in house with Ahoy to keep costs down and help against fraud
- 40:35 – Wistia is used for hosting / streaming videos and it has useful built in metrics
- 43:04 – Manually transcoding video is hard and expensive (Wistia does the dirty work here)
- 44:02 – Both Stripe and BrainTree are being used as payment gateways
- 45:49 – Inspired by Laravel, Chris wrote a Rails Engine called Pay
- 46:50 – It took 3 months to get payments to work with Stripe’s new SCA APIs
- 48:12 – Accepting payments went from being simple to outrageously complex
- 50:24 – You should deal with SCA now in the US to future proof yourself later
- 52:06 – Even the database is hosted on that single $20 server (2 CPU cores / 4 GB of memory)
- 52:36 – Honestly the database for GoRails is pretty tiny but it’s heavily backed up
- 55:39 – Walking through the deployment process from development to production
- 57:57 – GoRails isn’t using Hatchbox yet, but it will be eventually
- 58:13 – Upgrading Ubuntu LTS releases gets tricky without a 2nd web server
- 59:46 – Having a managed database would help with upgrading servers with minimal risk
- 1:00:41 – There’s a few seconds of down time for each deploy at the moment
- 1:01:30 – Passenger isn’t just for Ruby apps, it works with Python and Node too
- 1:02:34 – Everything will come up automatically after a system reboot
- 1:05:25 – Environment variables are protected with Rails’ encrypted credentials
- 1:07:39 – Best tips? Things are more changeable than you think, keep it simple initially
- 1:08:20 – Always keep your master branch deployable with automated tests
- 1:10:12 – Open sourcing and writing about the tools you’ve built helps everyone
- 1:13:08 – Chris is on twitter @excid3, also check out GoRails, Hatchbox.io and Jumpstart
Links
📄 References
- https://www.hatchbox.io/
- https://jumpstartrails.com/
- https://twitter.com/dhh
- https://www.youtube.com/watch?v=Gzj723LkRJY (famous 15 minute blog in Rails)
- https://tailwindcss.com/
- https://twitter.com/adamwathan
- https://github.com/flatpickr/flatpickr
- https://twitter.com/andrewkane
- https://egghead.io/