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.
Fun with Rails Query Tracing
Ever needed to find the calling code source of some DB queries? Perhaps that one update to a deprecated column… Some tips on tracking active record queries with a few simple options.
How I made $15k so far helping people fix Ruby issues on Mac
In February, I launched Ruby on Mac to help people get a working Ruby development environment on their Mac. It’s been going great so far. I’m now starting to publish my monthly income reports and retros in the spirit of building in public. Here’s the one for May, which was my first $5k Month as a Solopreneur.
Full-text Search with Elasticsearch in Rails
If you’re finding performance bottlenecks with full-text search in your database, it may be time to switch to Elasticsearch. In this tutorial, Ianis introduces Elasticsearch and shows us how to implement an efficient search feature in Rails. https://www.honeybadger.io/blog/rails-elasticsearch/
New Glimmer DSL for LibUI Apps: RubyCrumbler and Rubio-Radio
Every once in a while, I get approached by people who ask a lot of questions about my Glimmer Ruby gems, but never complete any work in them, which is quite surprising given the fact that it takes less than a minute to run a Glimmer sample, less than 10 minutes to write one, less than an hour to build a small desktop app, and less than a day to build an app MVP (Minimum Viable Product). That is why I am very happy to learn that a couple of apps have been recently built with Glimmer DSL for LibUI by open-source developers who fully walked the walk, not just talked the talk. [more inside]
PKCE 0.0.0 - An OAuth companion gem
In the off chance you are working with OAuth and need a gem which implements the Proof Key for Code Exchange (PKCE) specification, then my new PKCE gem might be of interest. It’s a simple gem with a simple API for obtaining the verify and challenge codes you’ll need. Enjoy!
Rubber Duck Dev Show Episode 47 | Ruby 3 Keyword Arguments
Hear two rubyists discuss the keyword argument changes in Ruby 3: https://www.rubberduckdevshow.com/episodes/47-ruby-3-keyword-arguments/
Glimmer DSL for SWT Video Tutorial 21 - Hello, Drag and Drop!
Desktop development is about 10 times simpler than web development. Learn it and you will become a better web developer as you transfer the simplicity of desktop development to the web! [more inside]
Ruby-on-Rails ViewComponents
A short tutorial, from scratch, for ViewComponents. [more inside]
Speeding up views rendering in Rails 4
It is well known that rendering views and partials in Rails is somewhat slow compared to other frameworks. In one particular part of the Rails migration for a large corporate client of ours, I had to migrate an endpoint rendering ~ 200 views. Using the standard render approach, the request took ~ 23s. Now, it’s down to ~ 300ms. [more inside]
How to Effortlessly Build an Instagram Clone With Hotwire
In this video, we’re going to look at how you can build an Instagram clone with Hotwire. https://youtu.be/VtzTTy65EMY
State Machines in Ruby: An Introduction
Let’s build a simple state machine in Ruby and use the state machines gem: https://blog.appsignal.com/2022/06/22/state-machines-in-ruby-an-introduction.html
Ruby 3 adds Scheduler Interface for Fibers
https://blog.kiprosh.com/ruby-fiber-schedular/ Ruby 3 introduced Fiber::SchedulerInterface to support the concept of non-blocking fiber. With this new interface, we can split the long I/O operations into separate fiber hooks, and instead of us controlling the fiber execution, the Scheduler will manage it for us.
Cheatsheet about extending Ruby classes
https://ptrela.pl/blogs/cheatsheet-about-extending-ruby-classes Some simple explanation of how include, extend and prepend works. My first blogpost which is published somewhere :)
xchan.rb: a lib for easily sending Ruby objects between Ruby processes
xchan.rb is a lib for easily sending Ruby objects between Ruby processes who have a parent<->child relationship. The implementation uses a UNIXSocket, and the serialization format of your choice - the default is Marshal.
Styling Simple Form forms with Tailwind
How we how we managed to style our new admin forms (built with Simple Form) with Tailwind CSS while keeping them flexible. https://dev.to/nejremeslnici/styling-simple-form-forms-with-tailwind-4pel
Scaling Rails web sockets in Kubernetes with AnyCable
At Brella - an event management platform - I am building our own chat to replace a third party service. To be able to scale web sockets more easily, I switched from regular ActionCable to AnyCable. I wrote a post on how I set this up in Kubernetes. [more inside]
Which one to use? eql? vs equal? vs == ?
This post shows development process for the Country Value Object using mutation testing and the difference between methods mentioned in the title [more inside]
Debugging Ruby on Rails applications
My first course has just been published on LinkedIn Learning. You can access it for free for a limited time by clicking on the link in my post: https://www.linkedin.com/posts/davidmles_im-introducing-my-first-course-on-linkedin-activity-6944601693942652929-E0IW?utm_source=linkedin_share&utm_medium=member_desktop_web
Ruby Call Path Analysis using TracePoint
Wrote this last year but still think this might help some Ruby folks performing trace analysis or different call paths. [more inside]
Designing A Dependency's Domain
This article decomposes an interaction with an external dependency into its component parts. It discusses how to test each piece individually and the overall architecture. https://kevinjmurphy.com/posts/designing-dependency-domain/