The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Easy Rails Deployment with Capistrano
How to deploy a Rails application to a VPS using Capistrano including automatically obtaining a free SSL certificate and using systemd + monit for self healing. Includes full instructions for repeatedly provisioning a server with Chef and complete sample code for both server setup and app deployment. [more inside]
How to test your Rails app with subdomains the easy way
When you look for ways to test your Rails app that uses (wildcard) subdomains, you are usually told to use lvh.me or similar domains as your host. But there is a better way
HTTP Caching in Ruby on Rails Applications
The fastest web page is one you’ve already loaded. Browsers love to avoid round-trips by caching assets. And HTTP provides ways for us to tell browsers what’s changed and what hasn’t - so they make the right decisions. In this article, Jonathan Miles introduces us to HTTP caching and shows us how to implement it in Rails. https://www.honeybadger.io/blog/http-caching-ruby-rails/
[Screencast] Multiple Resources with Devise
Sometimes we get into situations where our applications requires a different type of user account which wouldn’t really fit into a role. So, in this episode we look at creating multiple resources for authentication with Devise. https://www.driftingruby.com/episodes/multiple-resources-with-devise
InvoicePrinter 2.1 with Ruby 3 support
I just released InvoicePrinter 2.1 with Ruby 3 support. InvoicePrinter is a pure Ruby invoice PDF library.
Rails Best Practices 2021 — Part II [18m video]
I’ve worked with Rails over 10 years. Here I discuss log customizations for faster debugging, live coding in production REPL, systems for keeping website admins abreast of info, impersonating users for debugging purposes, and more. [more inside]
Collection of data files for automated tests
In this article, I show you how to create a nice collection of tests by putting each test in its own data file. https://format-express.dev/blog/collection-of-data-files-for-automated-tests
Interview with Jeremy Evans, Lead developer of Sequel & Roda
Jeremy Evans is the lead developer of the Sequel database library, the Roda web toolkit, the Rodauth authentication framework, and many other Ruby libraries. He is the maintainer of Ruby ports for the OpenBSD operating system, and has contributed to CRuby and JRuby, as well as many popular Ruby libraries. We are happy to present a brand-new interview with Jeremy to our readers. Hope you enjoy it! [more inside]
ActiveSupport::Notifications is Rad!
One of the lesser known parts of Rails core is the ActiveSupport instrumentation framework. ActiveSupport::Notifications includes all the things you need to implement pub-sub in Rails. Let’s explore the joyful shenanigans of this.
gem to protect your content from copy-pasting
https://github.com/igorkasyanchuk/secrett11tto (DEMO available) if you have sensitive or private content which you want to protect from copy-pasting you can try to use this gem. [more inside]
use this gem today :)
https://github.com/igorkasyanchuk/sabotage fun gem for April 1 :)
Nested constants in Ruby
Did you know you can define nested constants in Ruby like this? [more inside]
The S in SOLID
A discussion about the S in SOLID, covering the significance of this principle and some practical ideas for applying it. https://www.ombulabs.com/blog/learning/software-development/the-s-in-solid.html
Dislodging mimemagic And Understanding MIT & GNU GPL.
Learn the difference between the MIT and GNU GPL licenses to know which open-source software you can include in your projects. https://emmanuelhayford.com/dislodging-mimemagic-and-understanding-mit-gnu-gpl/
Lazy-loading content with Turbo Frames and skeleton loader
Add lazy-loaded content with your own custom loading skeleton with Hotwire + TailwindCSS: https://boringrails.com/tips/turboframe-lazy-load-skeleton
Exploring RSpec – Improving Your Testing Skills
Some great features everyone who works with rspec must use! [more inside]
Why Write Rails View Tests
Find out how and why to write Rails view specs with RSpec. [more inside]
Which is fastest? ERB vs. HAML vs. Slim
A fast app means happy users. The speed that your pages render depends on which templating system you use. In this article, Diogo Souza puts the three most popular Ruby templating engines to the test to see which is fastest. In the process, he shows us how to construct benchmarks and do our own investigations into performance. https://www.honeybadger.io/blog/ruby-template-performance-erb-haml-slim/
Anything I Want With Sequel And Postgres
In this article I talk about many Postgres goodies, including table partitioning, upserts, COPY, inserting from SELECT, unlogged tables, and loose counting.
Strategic 1.0.0 (Painless Strategy Pattern in Ruby and Rails)
The Strategic gem has been updated to better match the authentic Gang of Four Strategy Design Pattern, and has been finalized as 1.0.0 as a result. [more inside]