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.
Programming CryptoPunks & Copypastas w/ Ruby - Step-by-Step Booklet / Guide
Hello, I have started with a new (free online) booklet in the crypto collectible series titled Programming CryptoPunks & Copypastas Step-by-Step Book / Guide - Inside Unique Pixel Art on the Blockchain…. The first two chapters so far: 1) Do-It-Yourself (DIY),Yes, You Can Mint Your Own Punks in Original 24x24 Pixel Format or With 2X / 4X / 8X Zoom ++ 2) Statistics, Statistics, Statistics - Calculate Rarity & Popularity By Type, By Accessories, & More - Inside the 10 000 Punk Population. Cheers. Prost.
Refactoring Technique: Replace Conditional With Polymorphism
There are many ways to refactor a method with many conditionals. Before reaching for dependencies like dry-matchers, consider keeping it simple by using plain Ruby classes.
Free Ruby/Rails virtual bootcamp for under-represented groups
I’ve been discouraged recently seeing a bunch of friends from under-represented backgrounds being rejected from PAID tech bootcamps because they didn’t pass the screener. [more inside]
Finding and Fixing Missing Indexes in A Rails App with New Relic
In this post I walk through how I discovered a performance issue, determined the cause, fixed it, and verified the fix. https://scottbartell.com/2021/02/24/finding-and-fixing-missing-indexes-in-a-rails-app/
Log API requests in Rails
When exposing or consuming APIs, one of the most important things to remember is to log the calls you perform. [more inside]
render_async Adds Support for Rails Turbo
Read about how we came to support Turbo and what are our plans for the future. https://pragmaticpineapple.com/render-async-adds-support-for-rails-turbo/
Glimmer DSL for SWT Hello, Color Dialog! & Hello Font Dialog!
Glimmer DSL for SWT v4.18.5.1 & v4.18.5.2 just shipped with support for the color_dialog & font_dialog keywords and improved shape point inclusion detection. Happy Glimmering!
https://andymaleh.blogspot.com/2021/02/glimmer-dsl-for-swt-hello-color-dialog.html
New strings-truncation gem
The strings-truncation truncates strings with fullwidth characters, for example those found in Chinese, Japanese or Korean language. It also preserves ANSI codes so it’s suitable for building terminal applications. The characters can be omitted from the start, middle, end or both ends. Enjoy!
Dynamic Form Options With Hotwire Turbo Frames
I needed a way to dynamically show and hide form options based on what a user selects and wanted to use Turbo Frames. The benefit being all of the logic can be in the erb file of what to show and hide based on the current state of the model. [more inside]
Code Loaders in Ruby: Understanding Zeitwerk
What makes Rails magical? It just might be its code loader. Put a few files in the right places, and - presto! - you have a web app. When you use a class, Rails handles the include so you can stay focused on your code. But this magic isn’t just for Rails! You can add thread-safe code loading to your own apps via the Zeitwerk gem. In this article, Olasubomi introduces us to Zeitwerk and shows us how to integrate it with our own projects. https://www.honeybadger.io/blog/ruby-code-loader-zeitwerk/
Rails, Docker, and developer happiness?
Container-based Rails development environments have never sparked joy for me, and I’d like to change that. I’ve started a series of experiments with Docker-based Rails development environments, to deepen my understanding and hopefully make a more pleasant developer experience. So far, I’ve shared my rationale and methodology and initial setup experience on Everyday Rails.
Glimmer DSL for SWT Hello, Tree! and Hello, Canvas! Drag'n'Move
Glimmer DSL for SWT just had a relatively major release in version 4.18.5.0 adding a new long-awaited Hello, Tree! sample as well as Canvas Shape DSL parameter data-binding. [more inside]
Rails + Docker + Continuous Integration
We saved around 4-5 minutes of build time and 30% of docker image size while reworking our CI workflow and Docker image. Here is a wrap up of the tricks we used. https://medium.com/@apneadiving/rails-ci-docker-aa36399a4ebb
Interact with Mysql Server using mysql2 gem [Part 4] – Perform Transactions
This is the fourth part of the series where we create a service to interact with MySQL server in rails using mysql2 gem. Link: https://thedevpost.com/blog/mysql2-gem-perform-transactions/
HOTWiring an existing Rails Monolith: Forms!
Let’s say your majestic monolith is looking for more interactivity, and you’ve picked up Turbo. What aspects of a Rails app change that may cause some headaches? Add Turbo, and then follow along! https://onrails.blog/2021/02/18/hotwiring-an-existing-rails-monolith-forms/
Using Webpacker in Your Ruby on Rails Application — a Deep Dive
This article takes a deep dive into Webpacker and offers a detailed explanation that will enable you to understand how this tool works under the hood. [more inside]
Is Ruby on Rails dead in 2021?
https://blog.railwaymen.org/is-ruby-on-rails-dead
kittyverse Gem v1.0 - Incl. Cattributes, Traits, Genes & Genomes and More
Hello, I have updated the kittyverse gem that now includes all the lastest fancy cats (normal, exclusive, special editions), purrstige cattribute (with trait recipes) and more for CryptoKitties and Copycats - on or off chain. Did you know? The kittyverse gets used to auto-generate up-to-date pages for the Kittypedia - The Free CryptoKitties Encyclopedia. Cheers. Prost. Happy data wrangling with ruby. The future is meow.
3 tips to tune your VCR in tests
In this post I describe 3 things that have grown my trust in VCR. These are: [more inside]