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.
ActiveRecord Internals : You are not ready for this
This is the first part of my understanding of Rails active record internals. Do not hesitate to comment or ask questions. I would love to know what you think about this one! :) [more inside]
Overriding Rails engines models and controllers
If you have ever wondered, yes, you can override included engines models and controllers and here is how to do it.
Keeping Up With Ruby News All Week Long
This presents sources that highlight Ruby news on a weekly basis, giving you something to follow each day of the week. https://kevinjmurphy.com/posts/keeping-up-with-ruby-news/
Organic Test Driven Development in one file
I wrote about how I approach Test Driven Development in a very very lightweight manner at https://fly.io/ruby-dispatch/organic-test-driven-development/ by keeping gem dependencies, source code, unit tests, and documentation in a single file. This helps me keep iterations tight and rapid early on in a project. Once I’m ready to distribute it as a gem I break it apart into the usual files you’d see in a project.
Understanding the Ruby Global VM Lock by observing it
The Global VM Lock (GVL), is an implementation detail of the Ruby VM. At a high-level, it prevents code across multiple threads from running in parallel. The GVL can have a big impact on the performance and responsiveness of any application that uses more than a single thread to do its work. I’ve recently presented on this topic at RubyKaigi 2023; live interactive examples, the video, and slides are available at https://ivoanjo.me/blog/2023/07/23/understanding-the-ruby-global-vm-lock-by-observing-it/ .
Starting a Business With Kota Weaver | Rubber Duck Dev Show 96
In this episode, Kota Weaver interviews Creston Jamison on starting his software business: https://www.rubberduckdevshow.com/episodes/96-starting-a-business-with-kota-weaver/
Verifying Paddle Billing webhooks with Rails
If you want to use Paddle payment provider and their new Billing offering, I wrote how to verify Paddle Billing notifications.
satsnames gem v0.1 - sats names helpers for ordinal inscription names, relays & more
is it ordinal summer? i have packaged up scripts & datasets in the new satsnames gem that let you use “first-come / first-serve” .sats (or .paper or .game or …) name records to lookup ordinal inscriptions by (registered) names via relays and more. It’s (very) early. Happy blockchain surfing and programming with ruby.
Parallel Testing in Rails 7: Benefits and Pitfalls
Explore the realm of Rails 7’s parallel testing with our in-depth look into its efficiency-boosting capabilities and the challenges that might arise. As developers, understanding the tools at our disposal is paramount. Don’t miss out on this comprehensive guide that could revolutionize your testing strategy. Dive deep into the benefits and pitfalls of this robust feature at https://psmy.medium.com/parallel-testing-in-rails-7-benefits-and-pitfalls-66d38b8cd15e.
Rails Already Supports View Components!
The video for the Montreal.rb Ruby Meetup April 3, 2023 talk “Rails Already Supports View Components!” has been posted! This talk will explain the various ways Rails already supports view components out of the box. [more inside]
Skrift - a pure Ruby TrueType font renderer
Skrift is a tiny (<600 lines currently) pure-Ruby rewrite of the libschrift TrueType font renderer. [more inside]
Build Your Own Blockchain Layer 1 (L1) Ordinal Inscription Indexer
is it ordinal summer? i have started (yet) another free online booklet titled “ Programming Ordinal Generatives (Ordgen) / ORC-721 - Step-by-Step Book / Guide” and the first chapter titled Build Your Own Blockchain Layer 1 (L1) Ordinal Inscription Indexer is online using the unisat, ordinals and ordlite gems. Happy blockchain indexing and data analytics programming with ruby.
Introducing Plain: An AI Assistant Engine for Rails 🤖
I’m thrilled to introduce Plain, a Rails engine designed to supercharge your Rails development. It is a GPT Chat on your Rails app that knows the context of your code, so it can help you build new code, explain some features of your app, build specs, do refactors, etc. It also provides a documentation endpoint populated with Markdown files with front-matter support. [more inside]
Building Robust APIs with Ruby on Rails: A Glimpse into Modern Web Development
Dive into Rails API development with insights on CRUD, serialization, testing, and more. Enhance your expertise and elevate your projects! Get the comprehensive guide here: https://philsmy.gumroad.com/l/kskwa
New minitest-flash Gem for Your Fancy Red/Green Notifications
This just out: minitest-flash
reporter – dull as ditchwater yet useful IMO. It simply calls your personal minitest-flash
executable (usually a shell script) to trigger whatever fancy red/green notification you like. Safe to use on team projects as nothing happens unless the executable is present. The README showcases my setup for macOS which flashes the menu bar twice in either red or green along with an optional sound effect (mutable in case your ears have better things to do).
Deep dive in N+1 queries in graphql-ruby
After an article about migration which was controversial. :D Let’s dive in N+1 queries in rails with the graphql-ruby and graphql-batch gem. https://dev.to/yet_anotherdev/deep-dive-n1-queries-in-graphql-ruby-359m
Intro to GraphqlRails
An alternative way of writing GraphQL in RoR: https://dev.to/povilasjurcys/intro-to-graphqlrails-1c3o
Rails and the OpenAI Chat API
Using the OpenAI Chat API, Server-Sent Events and Rails to generate blogposts automatically. [more inside]
The Hidden Complexities of Running Shell Commands in Ruby
Did you know that system
supports the equivalent of >dev/null
output redirection? Or that backticks raise an exception when a command isn’t found, but system
does not? Let’s go on a deep dive into the surprising oddities and capabilities of the Ruby standard library! https://mattbrictson.com/blog/run-shell-commands-in-ruby
The latest issue of Rails Tricks is out!
It is about how I create static pages with Rails and how implicit rendering works in Rails. [more inside]
David Heinemeier Hansson has introduced a breaking change to sprockets.
Unfortunately, I couldn’t find any documentation; even the changelog was empty, but now I know. [more inside]
Every True Rubyist Builds Their Own Code Editor in Ruby!
Every self respecting Senior Software Engineer out there should build their own code editor, even if just as a toy app to later be discarded in favor of another code editor (though they might grow to prefer their own). And, if they are Rubyists, they should build their code editor in Ruby (whether using MRI Ruby, JRuby or Opal Ruby). If you think of yourself as a Ruby Senior Software Engineer, but cannot build your own code editor in Ruby, there are serious holes in your skillset!! Explore Glimmer libraries for many Ruby options to help you start the code editor building challenge and journey. [more inside]
unisat gem v0.1 - unisat.io lite helpers for full-text search in ordinal inscriptions
is it ordinal summer? i’ve bundled-up scripts in the new unisat gem that let you full-text search via unisat.io in bitcon ordinal inscriptions using an automated “puppeteered” google chrome browser and automagically save / cache the results page-by-page and handle the pagination / batch processing. happy gold mining / searching and data analytics with ruby. ps: it is still the early days (v0.1) ;-).
How the Rails params hash works
Uncover the inner workings of Ruby on Rails with our dive into the Params hash—an essential component for handling HTTP requests. From query params to avoiding injection, this article will elevate your understanding of Rails, providing you with the tools to create more secure and efficient web applications. https://www.honeybadger.io/blog/how-the-rails-params-hash-works/
[Judoscale] Autoscaling Heroku: The Ultimate Guide
So you’ve got your app up and running on Heroku, your web dynos are happily serving requests, and everything is smooth. Traffic is growing steadily, your SEO juice is increasing, sales seem to be on the up and up! But eventually the alerts begin… [more inside]