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.
Windows and WSL
In this episode, we’ll look at setting up a fresh Windows 11 environment for Ruby on Rails development. We’ll be looking at a few different tricks that makes managing a Windows environment much easier. https://www.driftingruby.com/episodes/windows-and-wsl
How to add or remove a Stimulus controller
A quick memo about how to add or remove a Stimulus controller - I recommend to rely on generator this time. [more inside]
Introducing ActiveRecordAnonymizer
Excited to share a new Ruby gem I’ve been working on: ActiveRecordAnonymizer! 🚀 [more inside]
Optimized Model Auditing with PaperTrail
Learn how to optimize model auditing in your Rails application using the PaperTrail gem by setting up separate audit tables for each model, enhancing performance and organization in the auditing process: https://danielabaron.me/blog/model-audit-paper-trail/
AnyCable v1.5: simplified pub/sub, whispering and more
This release’s major highlight is singed (and public) streams: skip channel classes and connect to your data streams directly (and securely), progressively enhance your application with bi-directional realtime features only when necessary (not so often). [more inside]
Live reload a Rails 7 application, an unsatisfaying attempt
Livereload a Rails app on your local machine is still not available natively. Maybe in next version of Rails, but not yet. [more inside]
Outgrowing Heroku: An AWS Migration Story
Facing Heroku’s limitations during their Black Friday frenzy, TeePublic moved their Rails monolith to Amazon ECS. This story details their journey, including the why, how, and impressive results of the migration. (Spoiler: it was a game-changer)
Happy 4th Birthday, Bridgetown!
Four years ago today, the Bridgetown publishing framework was born, the first public website launch and release of Bridgetown 0.10 happened a few weeks later, and the rest as they say is history. As always, a hearty thank you to all our sponsors and 70+ contributors who have helped this open source project flourish in ways I never could have imagined.
Series of Interviewing blog posts
My fellow Rubyists, I know this isn’t the most Ruby of all posts (except for the FizzBuzz example) but I’ve seen many people make simple mistakes during hiring processes. And I want to help fix that, so I’ve written a series of posts geared towards programmers about interviewing that I hope y’all will find helpful!
Rails on AWS book
Do you feel discomfort when connecting an AWS service with a Rails application because of unclear pricing rules, complex permissions, or advanced networking configuration? I felt this way for a long time until I dedicated myself entirely to learning AWS. With this book, you can master AWS in a short amount of time without spending months getting certified - Get the book now
HOTWire & Turbo Tutorial: Animated Deletions and Insertions
With the addition of the new Todo form appearing at the bottom of the Todos, and the delete action removing a Todo, we have a very functional app. It would be nice if those additions and removals had a little animation to emphasize what’s happening on the page. If there was a long list, we might miss the deletion, especially if a network request caused a delay in the removal of the Todo. We can hook into Turbo streams, and run some animations on these actions to make them appear and disappear. https://onrails.blog/2024/04/01/hotwire-turbo-tutorial-animated-deletions-and-insertions/
Clean up Your Messy Legacy Ruby on Rails Codebase With Rubocop
Setting up Rubocop on a new Rails application will get you on the path towards a well-maintained codebase. But what if you have an older project? [more inside]
Super Fast Rails
Most of the time, optimizing a Rails application requires repeating the same techniques. For example, at the database layer, it’s about creating the proper indexes, preventing 1+N queries, etc. Could we do that automatically? https://www.rorvswild.com/blog/2024/super-fast-rails
[gem] Redis-based distributed locks with "acquisition queue" capabilities
New gem (https://github.com/0exp/redis_queued_locks) [RedisQueuedLocks] that provides distributed redis-based locks with "lock acquisition" ordered queue capabilites and depends on pre-configured RedisClient istance (Reidis infrastracture layer you should provide by yourself) [more inside]
Pick a standard and move on
Don’t have standards and processes for your codebase and your team? You’re wasting so much cognitive energy! Let me try to convince you to pick one convention - any convention! - and move on to your core work.
Speeding Up Rails Assets Precompilation
There has been a lot of conversations on social media about the “NoBuild ” approach: using native browser features and plain CSS+JavaScript to avoid a precompilation step for our assets. [more inside]
Micro benchmarking value objects in Ruby: Data.define vs Struct vs OpenStruct
I did a series of benchmarks between Data class, Struct, and OpenStruct testing, creating new objects and accessing attributes. The tests consider keyword arguments and not positional arguments. [more inside]
I just released Kamal Handbook
The time has come and I released my new book Kamal Handbook: The missing manual. Kamal is an imperative deployment tool by 37signals and will be a Rails 8 default. [more inside]
OnStrum::Healthcheck - simple configurable application healthcheck ❤️ rack middleware
OnStrum::Healthcheck allows you to embed healthcheck endpoints into your rack based application to perform healthcheck probes. Make your application compatible with Docker/Kubernetes healthchecks in a seconds: https://github.com/on-strum/ruby-on-strum-healthcheck
Brute-forcing 2FA codes with Ruby
Ruby is a popular choice of scripting language in the infosec world because it makes it possible to write quick scripts to automate something. In this post, I explain how I used a little Ruby to brute-force 2FA codes: [more inside]