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.
Ruby Numbers and the Memory: how I got confused.
Here are little facts about Ruby memory that can help you get better results: https://evgeniydemin.medium.com/ruby-numbers-and-the-memory-how-i-got-confused-7f2fb53318be
How to install Ruby 2.6 on a Mac M1/M2 and Ventura without using Rosetta
I see a lot of people struggle to install Ruby 2.6.x on an Apple Silicon Mac, so I wrote a detailed guide that shows 3 ways to install Ruby 2.6 on Ventura, and explains why everything you’ve tried so far doesn’t work, and why you should consider updating your project to at least Ruby 2.7.7 instead.
artbase gem (& command-line tool) in Action - New Step-By-Step Guide (Anno 2023)
Hello, for the artbase gem (and “right-clicker” comand-line tool & machinery) I have written-up a new follow-along step-by-step guide (anno 2023) using the latest & greatest pixel art collection, that is, 1000 Un(official) Ordinal Punks in 24x24px. Happy pixel pushing with ruby. Cheers. Prost.
How to find a memory bloat in your Rails app before it happens
Memory bloat in Ruby happens when someone loads a lot of data to the memory. Ruby Virtual Machine does not return most of the allocated memory to the operating system even after data is collected as a garbage. It’s not a big deal for local development or console programs, but if you have a bloat in the big Rails app it might cost you a lot of money. [more inside]
Ruby2JS 5.1, esbuild, and a Peek at the Future
Ruby2JS 5.1 comes packed with several very welcome features, including a brand-new Ruby-based configuration DSL, a “preset” option for sane defaults along with magic comment support for sharing portable Ruby2JS code, and and esbuild plugin. Let’s dig in a bit on all these new features! Also an update on the status of Ruby2JS and its open source governance.
Getting Stuff Done With Drew Bragg | Rubber Duck Dev Show 74
In this episode, we discuss how to get stuff done with Drew Bragg: https://www.rubberduckdevshow.com/episodes/74-getting-stuff-done-with-drew-bragg/
Duped into modifying a frozen hash
Calling freeze on an object may not provide the immutability you expect. Here we dig into some of freeze’s nuances to explore a surprise of my own making I encountered working with ActiveSupport. https://kevinjmurphy.com/posts/modify-frozen-hash/
Protect your GraphQL data with resource_policy
How to integrate GraphQL with resource_policy gem to create fine-grained access control for your API. https://dev.to/povilasjurcys/protect-your-graphql-data-with-resourcepolicy-1pef
Rails Hotwire: mastering techniques for streamlining inline editing in your user inte
Recently, the inline editing capabilities demand has increased a lot. It allows users to edit certain fields in a form directly on the form page, without navigating to a separate edit page. No refresh nor reload page is needed. https://dev.to/ahmednadar/rails-hotwire-mastering-techniques-for-streamlining-inline-editing-in-your-user-interface-1h5m
gitti-backup & hubba gem In Action - Back-Up Your GitHub Repos Via git clone --mirror
Hello, what if your github repos are gone with a 24-hour (email) notice while you are offline? Prepare yourself and keep your own backups using the gitti-backup and hubba gems. See the How-To Back Up Your GitHub Repos - A Step-By-Step Guide for a write-up. Cheers. Prost. PS: What are your options? Do you use your own script(s) or other readymade tool(s) - please tell.
devise-otp 0.5.0 is out!
Since we got a brand new Devise release working with Turbo, I am also releasing devise-otp 0.5.0 so you can use the gems together inside your Hotwire app. If you want to skip building up all these 2FA flows, Business Class got updated with these latest Devise gems too!
High School - a Redis mutex in Ruby and Lua
Implements the locking strategy from Redis Labs’ book about… Redis :) https://census.dev/blog/high-school
Hix on Rails new release - free features, new builder, and more
Hix is a setup wizard for the project configuration flow. Select from setup options and enjoy a perfectly configured project. https://hix.dev/
Mastering Rubocop
We all love rubocop gem. It makes code cleaner and closer to standards; it is easy to say something like rubocop -a or even rubocop -A and see how your code is getting better, at least more stylish. https://medium.com/@real_wyodeb/mastering-rubocop-769ae6bdb4cd
Advanced interview questions for a Ruby developer
Have you ever felt frustrated when trying to prepare for an interview, and getting only questions like what is an MVC or what is the difference between a Class and a Module? Well, me too… https://t.co/hXWymzeF65
What's New in Rails 7.1
Let’s take a look at what we can expect from the upcoming Rails 7.1 release: https://blog.appsignal.com/2023/02/15/whats-new-in-rails-7-1.html
Step-By-Step Guide to Generate 100 Ordinal Punks In Your Own Terminal Via Text-Prompt
Hello, I have written-up a step-by-step guide to generate a “pixel-perfect” copy of the Top Selling 100 Ordinal Punks (in your own terminal) via text-prompts¹ (“attributes”)’. Yes, in ruby (using the pixelart gem, the artfactory gem, the punks gem, the backgrounds gem, the chunky_png gem, the cocos gem, the csvreader gem, & some more. Happy pixel pushing with ruby. Cheers. Prost. PS: Note¹ - Sorry - no artificial intelligence (a.i.) models in use :-( - just plain old “hard-coding by-hand”. Update While working on filing the counter notice - see the gitlab mirror backup for the step-by-step guide.
Adding Sorbet to a Rails project
Sorbet is a static type checker for Ruby. In this post, we will walk though how we can add sorbet to a new Rails app. Along the way, we will also see a few examples of how sorbet can help you identify and fix bugs in your code. [more inside]
My first Hanami app
In my opinion, Hanami is a breath of fresh air in the ruby world. Let’s take a look at why, and how it’s different from Rails. https://kukicola.io/posts/my-first-hanami-app/
ordinals gem - "right-clicker" (off-chain) ordinals (pixel art) machinery & helpers
Hello, in the ongoing crypto winter programming series in ruby I added yet another gem, that is, ordinals that incl. the ordbase command-line tool that lets you download, downsample & compose all-in-one ordinal (pixel art) collections from the bitcon blockchain via ordinals.com. See the ordinals readme for a ordinal punks step-by-step real-world example. New to ordinal punks? See Awesome 100 Ordinal Punks (Anno 2023) Notes. Happy blockchaining with ruby. Is bitcon up for a come back with ordinal digital artefacts? Are 8-bit golden (pixel) punks or birds (in png) the new digital gold nuggets? Cheers. Prost.