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.
TinyHooks has been released
I just released a TinyHooks, a helper library to easily define hooks for your classes and modules. If you’re a gem author, please try it out or read the code (only 64 lines!) and give some feedback!
ShinyCMS 21.04 (April 2021) - the 'Respecting Boundaries' release
Main addition in this release (and cause of some fairly major code shuffling) is Packwerk, to help define and enforce plugin boundaries. Also routes partials, bullet N+1 warnings in dev, CodeClimate coverage reporting to go alongside CodeCov, and improvements to various base controllers, base mailers, concerns, etc for plugins to inherit from.
appmap_swagger - generate Swagger for your Rails project, with no code changes
In this 2 1/2 minute video, I’m introducing a new tool for Ruby called appmap_swagger. [more inside]
ViewComponent-Contrib: extensions, tools and guides for ViewComponent
view_component-contrib is a meta-gem and a collection of guides on using ViewComponent in Rails projects. [more inside]
Alba, the fastest JSON serializer for Ruby, reached 1.0.0!
I just released version 1.0.0 of Alba, the fastest JSON serializer for Ruby. If you want fast, flexible and well-maintained JSON serializer, please try it and give some feedback!
Build Real-Time Command Line Applications with Action Cable and Thor
Creating a command-line client that receives live updates from an actionable server has been my life-long dream. Okay, not really, but I still think it’s kind of neat. [more inside]
The 6 Characters That Could Bring Down Your Rails App
A true story about how choosing the wrong method had big consequences, and how I fixed it. https://www.moncefbelyamani.com/the-6-characters-that-could-bring-down-your-rails-app/
Set up Tailwind CSS JIT in a Rails project to compile styles 20x faster
Learn how to switch to the latest and greatest just-in-time compilation feature from the freshly released Tailwind CSS 2.1 in a modern Rails app with styles managed by Webpacker. Only three small commits are required to adopt an entirely different development experience.
Super v0.0.12 (and 11 and 10 and 9 and 8)
Super is a featureful, lightweight Rails admin framework. Here are some recent highlights https://zachahn.com/posts/1617717106
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.