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.
When (and When Not) to Use GraphQL in Your Rails App
Let’s explore when GraphQL is the right choice for your Ruby on Rails application and when it is not. Read Here - When (and When Not) to Use GraphQL in Your Rails App
Ruby pomodoro timer with exceptional tunes
SO. pomo. It is inspired by TJ Holowaychuk’s pomo I’m pretty sure I used in 2014. It’s a lightweight executable you can pop in your /usr/local/bin/pomo, sprinkle a little chmod +x /usr/local/bin/pomo magic on it, and BOOM! Pomotization complete. [more inside]
Rails 7.1 raises error when generating model attributes with reserved names.
rails_performance new release
https://github.com/igorkasyanchuk/rails_performance now with P50/P95/P99 information. Please check it. A simple, free, and self-hosted alternative to New Relic
Solidus v4.4 has been released
The latest version of the Rails e-commerce platform Solidus has been released today with significant improvements for the new Admin and Rails 7.2 support. [more inside]
Seamless migration from third-party mocks to RSpec built-in mocking framework
This gem provides RSpec dual mocking compatibility. You can use RSpec’s mocks as secondary, alongside a primary, alternative mocking library. Also it includes built-in rake task for tracking current migration progress. https://github.com/mocktools/ruby-rspec-mock
Hotsheet 0.1.0 - A new challenger appears!
https://github.com/renuo/hotsheet This gem allows you to mount a view to manage your database using a table view where you can edit database records inline (no rails console required!). Give controlled DB access to your admin users without having to create CRUD views for each table.
Relay mails into ActionMailbox with existing Postfix server
One slightly under-documented ingress for ActionMailbox is using Postfix relaying. It is easy to integrate into an existing Postfix mail server by just adding another virtual_alias_map and also supports Regexp matching of many different mails (so 1 mail per customer easy achievable). Goal is to POST the mail into our App-Server using a small CURL script without adding new dependencies to the MTA server. [more inside]
Web Application Security in Ruby on Rails
Web application security is the cornerstone of protecting your Rails applications from malicious attacks and unauthorized access. Read the full article here - Web Application Security in Ruby on Rails.
Optimize Database Performance in Ruby on Rails and ActiveRecord
Let’s dive into some strategies to optimize database performance in Rails and ActiveRecord: https://blog.appsignal.com/2024/10/30/optimize-database-performance-in-ruby-on-rails-and-activerecord.html
Deploying a Jekyll site with Kamal
If you are like me and you have Jekyll sites that you would like to host alongside your Rails apps, you can deploy them with Kamal 2: [more inside]
Hanami 2.2: Persistence pays off
https://hanamirb.org/blog/2024/11/05/hanami-220/ — With our new database layer and operations, the Hanami 2 vision is complete!
Rails View Patterns: Helpers vs Partials vs Presenters vs Decorators
In my previous post I covered Why use Presenters than Components OR Integerate Them Together so when to use helpers, presenters, partials, and decorators got missed. This article - Rails View Patterns: Helpers vs Partials vs Presenters vs Decorators covers this extensively with code examples from a production app. I hope you enjoy reading the article and get your Rails views organized.
Using GraphQL with LLMs in Ruby
https://workflow.ing/blog/articles/using-graphql-with-llms-in-ruby - Use OmniAI to chat with GraphQL.
Kamal Kitchen Sink
In this episode, we look at creating an entire infrastructure (proxy, load balancer, app servers, worker servers, database server, and a storage server) on our own hardware use Kamal to provision and deploy our Ruby on Rails application. https://www.driftingruby.com/episodes/kamal-kitchen-sink
Ruby on Rails 8 Concurrency Guide: Modern Parallel Processing
Ruby 3 has concurrency and parallelism then how can Rails be behind?! This article explains how we can implement concurrency and parallelism in our Rails 8 apps, and is the continuation to my previous article Ruby Concurrency and Parallelism. Read it here - Ruby on Rails 8 Concurrency Guide: Modern Parallel Processing - to build more faster and scalable Rails apps.
Released tty-link v0.2.0
The newest tty-link implements a brand-new API that supports Alacritty, Kitty, WezTerm, and many more modern terminals. It allows hyperlink detection configuration with a keyword or environment variable.
Ruby Concurrency and Parallelism
I have been seeing a lot of discussion comparing Elixir with Ruby for its concurrency features. The point these discussions miss is that Elixir runs on top of ErlangVM which had concurrency built-in as it was developed for running humungous-large-scale telecom systems. Whereas, Ruby was developed by Matz as a Software Language easy to understand and write. Ruby already had concurrency features through threads and fibers since its 1.9 version and Ruby 3 added parallelism features through ractors. This article covers all these 3 in detail and with a lot of code examples related to even AI and ML. Read it here - Understanding Ruby 3.3 Concurrency: A Comprehensive Guide.
new release of rails_performance gem
https://github.com/igorkasyanchuk/rails_performance has a new release 1.3.0 with CSV export and some other fixes and improvements [more inside]
Why use Presenters than Components OR Integerate Them Together
This article covers a) What are Presenters? b) Why use Presenters c) Presenters vs Components d) How to Implement Presenters e) Presenters vs Decorators. For Rails newbies these are very confusing thus this article removes this confusion and helps new Ruby on Rails developers to learn how to properly architect their Rails 8 apps. Read it here - Why use Presenters than Components OR Integerate Them Together.
Montreal.rb May 2024 - Hotwire Turbo in Rails: Drive, Frames and Streams
The video of the Montreal.rb May 2024 talk “Hotwire Turbo in Rails: Drive, Frames and Streams” by Helmer Davila has been finally posted on YouTube: https://www.youtube.com/watch?v=rmsBVsZUHzI&list=PLRAf4zt5oEjc2mqmEN9m_O0JovQCXxvxt&index=13 [more inside]
Argon2id: Ruby bindings to Argon2
The first public release of new, native, pre-compiled Ruby bindings to the reference C implementation of Argon2, the password-hashing function that won the 2015 Password Hashing Competition: https://github.com/mudge/argon2id [more inside]
Hotwire and HTMX - Same Principles, Different Approaches
I’m an experienced Hotwire user and I also recently read the book by HTMX authors. I found some interesting similarities and differences between the two: Hotwire and HTMX - Same Principles, Different Approaches