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.
TRAILBLAZER TALES #06 | DRY-Validation
Another Trailblazer screencast is out. In this session we discuss the dry-validation library and how it fits seamlessly into Trailblazer. https://www.youtube.com/watch?v=X65ssLplQkk
Hanami v2.0.0.alpha6
Introducing Hanami Providers. Fine grained control on your app features with Partial Slice Import/Export. Support Ruby 3.0+ only. https://hanamirb.org/blog/2022/02/10/announcing-hanami-200alpha6/
Getting Integration Tests Right
Find out how integration testing can become as straightforward as unit testing. https://semaphoreci.com/blog/integration-tests
Ruby constants
How to define constants in Ruby, and how to use them - with one tricky part. [more inside]
Glimmer DSL for SWT Video Tutorial 2 - Hello, Message Box!
The Glimmer DSL for SWT Video Tutorial 2 is out! It walks software engineers through Hello, Message Box! [more inside]
5-Step Strategy for Optimizing Slow Tests
đź‘€ Super helpful tutorial on how to optimize your slow tests https://semaphoreci.com/blog/slow-tests-strategy
Ruby on Rails 7 Drag & Drop With Hotwire
If you’re confused about Hotwire, Turbo, or Stimulus JS, I made a video about how to build a drag & drop feature using Hotwire’s Stimulus JS and Turbo streams. [more inside]
Enummer: Multi-value enums in Rails
Enummer is a lightweight answer for adding enums with multiple values (aka flags, bitfields) to Rails, with a similar syntax to Rails’ built-in enum. Potential alternative for flag_shih_tzu.
Ruby on Mac - Get a working Ruby dev env with a single command
Every day, hundreds of people struggle to install gems like Rails and Jekyll on their Mac. That’s why I built Ruby on Mac, a reliable script that just works whether you have a brand new Mac or are trying to fix a broken dev env.
Zero downtime PostgreSQL migrations with online_migrations gem
 https://github.com/fatkodima/online_migrations - for those familiar with strong_migrations, it is a “strong_migrations on steroids”.  [more inside]
Using AWS S3 For File Storage in Rails Apps
S3 is an excellent way to store files scalably and reliably. This article by Jeff Morhous will show you how to use S3 to store files uploaded to a Rails app. https://www.honeybadger.io/blog/rails-app-aws-s3/
Custom esbuild for Rails
Inside Rails 7 apps, esbuild is wrapped into jsbundling. But what if you want to customize this build ? https://www.bootrails.com/blog/custom-esbuild-for-rails/
[Screencast] Hotwire Modals
In this episode, we look at creating an unobtrusive and efficient way to launch Bootstrap modals using Turbo and Stimulus. https://www.driftingruby.com/episodes/hotwire-modals
Loading Rails fixtures for seeding the database
I really like Rails fixtures to model the testing world. Here’s how I use fixtures in development as well.
The power of group+aggs User.calculate_in_group(:count, :age, [...10, 10...50, 50..])
https://github.com/igorkasyanchuk/calculate_in_group with this gem you can group and do aggregations with ranges or values. More examples available on github.
Dependency Injection in Ruby - GOD Level! Meet dry-system! (Part 2)
Dependency injection brings you great power but comes with its own headaches. If you can get rid of them, You’re left with the power only. [more inside]
Glimmer Wordle Desktop GUI
I implemented a Wordle word game desktop GUI app test-first using Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) as inspiration by the recent Kevin Newton’s blog post about Solving Wordle in Ruby. [more inside]
2021 Was The Year of The Ruby Desktop!!!
Gerald Bauer started 2021 with a reddit post having the following question in its title: “2021 - The Year of the Ruby Desktop?” [more inside]
FRS - automation script for spin-uping Ruby developer environment
Configure your developer stuff on Linux Ubuntu in minutes 🚀 Focus on development, not on developer tools! https://github.com/RubyWorkout/frs
Rubber Duck Dev Show Episode 28 | Exploring the Jamstack
Hear two rubyists explore the uses of the Jamstack: https://www.rubberduckdevshow.com/episodes/28-exploring-jamstack/