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.
Processing SEPA transactions with Ruby
Check out how to process SEPA transactions with Ruby using a few tools. [more inside]
Rails Puma on SSL for localhost!
Had trouble with the new Cookie policy update from Chrome? Or you just want to start coding under HTTPs, check out my post then :D [more inside]
It's Time to Visit Bridgetown
Bridgetown is a Webpack-aware, Ruby-powered static site generator for the modern Jamstack era. It began as a fork of Jekyll and is evolving into so much more! Read the kickoff announcement, browse the docs, and check out (or checkout?) the repo on GitHub. Contributors welcome!
It's Easy to Build: Custom docs project | Part 2 - HTML to MD
In this second part of the series - It’s Easy to Build: Custom docs project, we’ll learn how to convert our HTML code to an markdown text using Ruby. Link to Blog Post
Looking Inside a Ruby Gem
Have you ever wondered what a gem is? What’s inside a Ruby gem? In the Looking Inside a Ruby Gem article, I’d like to take you to the RubyGems factory to see where it all begins. We will first learn how to create a Ruby gem and then unpack it and look inside the internals.
Rails Performance: When is Caching the Right Choice?
We’ve all been there. You’re clicking around your Rails application, and it just isn’t as snappy as it used to be. You start searching for a quick-fix and find a lot of talk about caching. Take your existing app, add some caching, and voila, a performance boost with minimal code changes. However, it’s not this simple. Like most quick fixes, caching can have long-term costs. In this article, Jonathan Miles discusses what caching is and what can go wrong, as well as explains non-caching strategies you can use to speed up your Rails app. https://www.honeybadger.io/blog/rails-caching-alternatives/
Rails Syntax Highlighting for VSCode
For anyone that enjoys Syntax Support https://github.com/smridge/vscode_rails_syntax . Started a collection of known rails methods now identified in Visual Studio Code (VSCode) via extension install.
PaperTrail Gem Tutorial
I wrote a tutorial on how to revert and restore records using the PaperTrail Gem. [more inside]
ActiveRecord::Migration: terminology
In the context of a database, a migration refers to the action of manipulating records (update, insertion, deletion, etc..). [more inside]
Simple API for Ruby releases and branches info
Rubies.io is a simple and open source API written in Sinatra with a Redis backend to programmatically fetch info regarding Ruby versions, releases and branches. Need to know if 2.7.1 is still the last version? /api/2.7.1 is the answer. Wanna verify which branches are in security maintenance? /api/security. Check out Rubies.io.
Using multiple PostgreSQL databases in your Gitlab CI
I recently tested out running multiple databases, a feature that was introduced in Rails 6. This caused a bit of a problem in my Gitlab continuous integration set up. Here’s a short note on how I fixed it: https://rails.substack.com/p/using-multiple-postgresql-databases
Introduction to Stimulus Reflex
Stimulus Reflex lets you build realtime, reactive apps in Rails similar to Phoenix LiveView. You don’t have to write any Javascript and it will use Rails to render all the HTML updates server-side. Check out Stimulus Reflex.
NEW: You don't have to be a genius to contribute to the open source
I’ve just published a new post on That Weekly Tech. You don’t have to be a genius to contribute to the open source ––> https://www.thatweeklytech.com/posts/5-you-don-t-have-to-be-a-genius-to-contribute-to-the-open-source
Full Text Search in Milliseconds with Rails and PostgreSQL
In this article, Leigh Hallidays shows how to optimize a Full Text Search implementation, taking a single query from 130ms to 7ms. [more inside]
ViewComponent at GitHub with Joel Hawksley [Podcast]
Joel Hawksley is the guest on today’s episode. He is a Software Engineer at GitHub and works on the design system team, leading development on ViewComponent, formerly known as ActionView::Component. Joel is a very encouraging, uplifting, and inviting guest who tells it like it is. Andrew even throws in a little “homework” for those of you listening! If you want to learn more about how GitHub is leveraging ViewComponent, give this episode a listen!
Function Composition in Ruby
In this article, we’re going to explore the following topics:
Well-behaved Ruby Objects: Equality
A “well-behaved” object in Ruby needs to understand: What makes two Ruby objects “equal”? And which version of “equal” (there are several in Ruby)? And what makes an object usable as a Hash key? And is that the same thing that makes them Comparable? https://stevenharman.net/well-behaved-ruby-object-equality