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.
5-Step Strategy for Optimizing Slow Tests
đź‘€ Super helpful tutorial on how to optimize your slow tests
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.
Rails Quick Tip - Display Current Environment in Console Prompt
Am I the only programmer who once or twice messed up production by thinking it was development? In this short tutorial, I’ll describe a simple way to reduce the risk of mixing up your current working Rails environment. [more inside]
Zero downtime PostgreSQL migrations with online_migrations gem
- 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.
Custom esbuild for Rails
Inside Rails 7 apps, esbuild is wrapped into jsbundling. But what if you want to customize this build ?
[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..])
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!
Rubber Duck Dev Show Episode 28 | Exploring the Jamstack
Hear two rubyists explore the uses of the Jamstack:
How to Deal With and Eliminate Flaky Tests
Flaky tests are pretty common in the software industry. But they only become a serious problem when we’re not proactive about fixing them.
Ruby Regex : a friendly tutorial
Ruby regexes are not so easy to grab. We tried to make this little tutorial as simple as possible. [more inside]
[screencast] Function in Ruby
Hello all, I have made a screencast about functions in Ruby, one may watch it here
Glimmer DSL for LibUI Wins Fukuoka Ruby 2022 Special Award
I am very happy to announce that Glimmer DSL for LibUI (Ruby Desktop Development GUI Library) has been judged directly by Matz (creator of Ruby) and the 2022 Fukuoka Ruby Award Competition Judges and have won a Fukuoka Ruby 2022 Special Award! [more inside]