Latest Ruby news from the world

23 January 2023

Avoiding bugs in Ruby code using the state pattern

In this article, the author will take you through an example, at first with a brittle implementation, and then reworked using the state pattern into something more stable.
Ruby News
Jan2023
23 January 2023

Simplifying DOM Element Generation in Rails with the Enhanced dom_id Method

Learn how the recent enhancement to the Rails dom_id method allows developers to generate both an ID and a class for an element in a single line of code.
Ruby News
Jan2023
23 January 2023

How to Delete a Directory in Ruby

In Ruby, there are several ways to delete a file or a directory. In this article, we will discuss two of the most commonly used methods: File.delete and FileUtils.remove_dir.
Ruby News
Jan2023
20 January 2023

A Shallow Dive into Memory Leaks in Ruby

In this post the author explains how to avoid memory leaks in Ruby.
Ruby News
Jan2023
19 January 2023

Refactoring instance variables to local variables in Rails controllers

In this post, the author will show how to take advantage of shorthand hash syntax while changing from instance variables to local variables in controllers and views.
Ruby News
Jan2023
19 January 2023

10 Ruby tricks to improve your code (or not)

In this post the author shows you 10 nice Ruby features to improve your code.
Ruby News
Jan2023
19 January 2023

Server-Side Request Forgery in Rails

In this post the author explains what is Server-Side Request Forgery (SSRF), and why is it a concern for web security?
Ruby News
Jan2023
17 January 2023

Evaluating More Coverage in Ruby 3.2

In this post the author explains how the Coverage module can measure the coverage of a Ruby expression in a string passed to the eval method.
Ruby News
Jan2023
17 January 2023

Signed URLs with Ruby

Signed URLs can be a very useful solution in many cases when you need to provide limited access to some resources or actions. In this post the author will focus on when and how to use them in Ruby, with Rails, or by providing a custom implementation.
Ruby News
Jan2023
12 January 2023

How to create a Ruby on Rails gem from your existing code

A step-by-step tutorial on how we extract code from our Rails app, package it into a gem, and publish it on RubyGems.org.
Ruby News
Jan2023
11 January 2023

Ruby News December 2022 Digest

Ruby News December 2022 Digest
Ruby News
Jan2023
10 January 2023

Applicative programming in Ruby: advanced behaviors

In this post the author shows how to create applicative lists and parsers.
Ruby News
Jan2023
5 January 2023

Reliving Your Happiest HTTP Interactions with Ruby’s VCR Gem

In this post the author explains how to debug or test a complicated or involved set of remote API operations.
Ruby News
Jan2023
5 January 2023

Rails 7.1 supports infinite ranges for Active Record Validators

In this post the author shows how Rails 7.1 supports infinite ranges for Active Record Validators.
Ruby News
Jan2023
29 December 2022

Performance of Exception Handling in Ruby

In this article, we will explore the performance implications of using exceptions in Ruby and discuss some best practices for minimizing their impact on your application's performance.
Ruby News
Dec2022
23 December 2022

Geocoding with Ruby

In this article, we will explore how to perform geocoding using the Ruby programming language.
Ruby News
Dec2022
22 December 2022

Ruby Split Array

Split is a very common method not only in Ruby, but also in the programming world. Let's see what dos .split means for a Ruby Array.
Ruby News
Dec2022
21 December 2022

A Guide to Memoization in Ruby

In this post, we'll look at the benefits of memoization and when to use it in your Ruby application.
Ruby News
Dec2022
21 December 2022

Rails optimizes ActiveRecord batching for whole table iterations

Response times for batch queries have significantly improved by moving to a range-based iteration strategy.
Ruby News
Dec2022
21 December 2022

What not to forget when implementing a pattern-matching in Ruby for custom objects

The practical article about some considerations for implementing proper pattern-matching for your classes.
Ruby News
Dec2022
21 December 2022

How to Monitor and Fix PostgreSQL Database Locks in Rails

In this blog post, the author will describe how to monitor database locks and propose best practices to prevent them from causing issues.
Ruby News
Dec2022
20 December 2022

Metaprogramming with Ruby

In this article, we'll explore the basics of metaprogramming in Ruby and see how it can be used to write concise, expressive code.
Ruby News
Dec2022
20 December 2022

Rails console command made easier

A short article about how to simplify the Rails console command thanks to the aliases file.
Ruby News
Dec2022
20 December 2022

Ruby 3.2 introduces Enumerator::product

Learn how to use the Enumerator::product method.
Ruby News
Dec2022