Ruby on Rails | rubyclub
1.52K subscribers
213 photos
1 video
262 links
Software Writer @yegorckv
Download Telegram
💻Hotwire Native for Rails Developers

A new book, Hotwire Native for Rails Developers, is now available on The Pragmatic Bookshelf. Currently in beta, it’s ready for purchase and study.

About the Book:

Hotwire Native for Rails Developers is a guide for those looking to build native mobile applications using Ruby on Rails.

The book provides detailed instructions on how to integrate Hotwire Native into both new and existing Rails applications. Readers will learn how to:

- enhance mobile apps with native components;
- gradually add native screens;
- ensure their apps look and feel native to iOS and Android platforms.
Please open Telegram to view this post
VIEW IN TELEGRAM
🖼️ SQL aliases with hashes

The new version brings even more convenient features. For example, you can now define SQL column aliases using hashes directly in the select method.

Before:

Comment.select("moderated_at AS moderation_timestamp")


After:

Comment.select(comments: { moderated_at: :moderation_timestamp })
Please open Telegram to view this post
VIEW IN TELEGRAM
Ruby Next: Transpiling Modern Ruby Code to Work on Older Versions

Ruby Next is a tool that allows you to run code written using the latest Ruby syntax on older versions of the language or alternative implementations like mruby or Opal.

Why is Ruby Next useful?

Compatibility with different Ruby versions: If you want to use modern syntax in your projects while still supporting users on older Ruby versions, Ruby Next is a great solution.

Helpful for library maintainers: If you maintain a library, Ruby Next can help you transpile your code for a broader audience.

Experimentation and research: It’s also a great way to try out modern Ruby features, even where they aren’t officially available yet.

Ruby Next is an excellent tool for those who want to combine innovation with support for older systems. Give it a try and see for yourself.
🐙 Balticruby extended call for proposals till 1st February, 2025

papercall.io/balticruby25
Please open Telegram to view this post
VIEW IN TELEGRAM
New Feature in Ruby 3.4.x

The latest Ruby 3.4.x introduces a new shorthand: you can now use it to reference the single block argument automatically.

In Ruby 3.3.x and earlier, we had to write:


['Vaaai'].map { |item| "#{item} Corinthians!" }
# => ["Vaaai Corinthians!"]


Now, in Ruby 3.4.x, we can simplify it to:


['Vaaai'].map { "#{it} Corinthians!" }
# => ["Vaaai Corinthians!"]
🖼️ This Week in Rails: Updates and Improvements

update_all now supports JOIN for PostgreSQL and SQLite
You can now use update_all with JOIN, making data updates even more convenient for these databases.

Password reset rate limiting added

Rails now includes built-in protection against password reset abuse, enhancing the security of your applications.

Statement-cached queries are now retryable

If a cached query fails, it can be retried, making database operations more resilient.

Multi-DB migration fixes

Improved support for migrations in applications with multiple databases, simplifying their management.

Faster Docker builds

Docker image builds are now faster, saving developers time.

Check out more details here: This Week in Rails
Please open Telegram to view this post
VIEW IN TELEGRAM
2
💳usage_credits - Ruby gem to add usage-based credits to your Rails app

- Refill credits with Stripe subscriptions
- Sell booster credit packs mid-cycle
- Expire or rollover credits to the next period
- Keep an audit trail of all transactions
Please open Telegram to view this post
VIEW IN TELEGRAM
💻Hotwire Native: Demo Site Migrates to Rails

The Hotwire Native demo site now runs on Ruby on Rails, unlocking new possibilities for developers. The update includes enhanced navigation, integration with native components, and usage examples such as forms, menus, and flash messages.

native.hotwired.dev
Please open Telegram to view this post
VIEW IN TELEGRAM
💻 Camera Access With Hotwire Native

In this blog post, the author discusses how to access the camera and display a camera feed in Hotwire Native.
Please open Telegram to view this post
VIEW IN TELEGRAM
The Pay gem for Rails is a powerful tool for integrating payments. Just a few lines of code, and you get:

- Automatic handling of customer IDs
- Webhook setup
- Ready-to-use database models

Now you can focus on your product, not the busy work.

💬 x.com/RailsQuest
Please open Telegram to view this post
VIEW IN TELEGRAM
👩‍💻 DHH about Docker

Use Docker to run auxiliary services like databases, Redis, and ElasticSearch. However, it's better to install core languages (Ruby, JavaScript, etc.) natively, for example, using mise. This eliminates versioning issues ("works on my machine"), minimizes hassle, and ensures great performance.

This approach is used at 37signals, and their test suite runs very fast, even on platforms where Docker isn't as efficient (e.g., Mac). But for maximum performance, nothing beats AMD on Linux.
Please open Telegram to view this post
VIEW IN TELEGRAM
👩‍💻 Ruby's Renaissance in the AI Era

An interesting perspective on the potential advantage of #Ruby in AI development.

Generating equivalent functionality in Ruby costs approximately one-third of what it does in TypeScript. This might open up new opportunities for AI solutions.
Please open Telegram to view this post
VIEW IN TELEGRAM
Clean Ruby Code Without Surprises

- Use Data.define for value objects—simple and safe.
- Add strict type validation in the constructor.
- Create instances with proper objects, not strings.
- Catch errors early, avoiding unexpected runtime bugs.

Ruby 3 keeps your code readable and reliable, with no unnecessary magic.
💻 Bridge Components for Hotwire Native

A set of 11+ components with support for iOS and Android, example apps for iOS, Android, and Rails, and full source code.

Copy, paste into your app, and wire up the HTML.
Please open Telegram to view this post
VIEW IN TELEGRAM
VilniusRB April meetup

https://lu.ma/lot8n2x3

"A tale of three chat servers"
Thijs Cadier (AppSignal, Netherlands) will unravel how Ruby handles multiple tasks at once, comparing Puma vs. Unicorn, explaining ActionCable’s event-driven approach, and breaking down the underlying mechanics.

​"TDD 2.0: AI Brings Test-Driven Development Back on Track"
Sergy Sergyenko (Cybergizer, Lithuania) will explore how AI is revolutionizing TDD, making testing faster and smarter with tools like RSpec-llama. Expect real-world insights, a live demo, and practical takeaways for integrating AI into your workflow.
Kamal Deployment: The Newest Form of Self-Torture

Today I’ll show you how to stop wrestling with Kamal 2 and spend your time more productively. I spent several days configuring Kamal and… I failed spectacularly. I’ve been using Rails for over 15 years, and yet I felt completely stupid being stuck with this piece of… art (yes, definitely art!). Thanks to my friend and colleague Igor Aleksandrov, who helped tremendously and pointed out several issues with my configuration, I decided to write this guide to save you from making the same mistakes I did.
Please open Telegram to view this post
VIEW IN TELEGRAM
💻 Defying Front-End Inertia: Inertia.js on Rails

At the Tropical on Rails conference, there was a great talk by Svyatoslav Kryukov about using Inertia.js with Rails.

Unlock the power of modern front-end frameworks in Rails with Inertia.js! Build dynamic, single-page apps while keeping Rails simplicity—no APIs, no client-side boilerplate. Leverage React, Vue, or Svelte to tap into the vast front-end ecosystem and deliver interactive user experiences effortlessly.
Please open Telegram to view this post
VIEW IN TELEGRAM
💻DHH about Local CI

Local CI in 10 seconds. No cloud, no fuss.

gh-signoff is a GitHub CLI extension that turns your laptop into a CI runner. Run your tests locally and sign off on the commit when it’s green.

Remote CI is great for huge builds and parallel test suites. But most apps don’t need all that.

Dev machines are faster than ever — and you already paid for them. Cloud CI is slow, pricey, and rented.

Want that green GitHub checkmark? Get it locally.

github.com/basecamp/gh-signoff

rails test && gh signoff
Please open Telegram to view this post
VIEW IN TELEGRAM
🖼️ The new edition of This Week in Rails is out!

It features updates and improvements from contributors including Justus Flerlage, Hartley McGuire, and more. Check out the full edition here:

rubyonrails.org/2025/4/18/this-week-in-rails
Please open Telegram to view this post
VIEW IN TELEGRAM
📺 Deploy Rails 8 to Render.com. Solid Trifecta on Postgres

These days Render is my go-to tool for deploying Rails apps.
For example, SupeRails.com has been hosted there for 2 years now.

Render is as easy as Heroku to maintain, but cheaper to scale.
Please open Telegram to view this post
VIEW IN TELEGRAM
Ruby 3.4 on Rails 8: what's new, and shall we upgrade now? 🤔

At our online meetup on May 2, Vlad Frolov (Software Solution Architect) will tell us about the key features of Ruby 3.4 and the major changes in Rails 8. We’ll discuss Hotwire evolution and gem compatibility – everything you need to know to stay ahead in the Rails ecosystem in 2025 🌶️

🎟️ Register here: https://people.andersenlab.com/events/ruby-online-may?utm_source=li&utm_medium=meetup&utm_campaign=0205

Meetup details:
Time: 17:00 (CET)
🕒 Duration: 1 hour
🗣️ Language: English
💻 Online: The link to the stream will be sent to your email specified in the registration form