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.
A guide to setting up your next GitHub project
This is not Ruby-specific, but if you are creating a GitHub repo for your next Ruby project, you’ll want to review the following best practices: Improve your GitHub workflow with better repository defaults. Includes a quick introduction to some interesting low-level features of the gh CLI.
Keep Your Ruby App Secure with Bundler
By the end of the post, you will understand how bundler audit and bundler outdated work. Both can help you monitor the security state of your project’s dependency tree. [more inside]
Using Rails.env.local? in Rails
Explore using Rails.env.local? which returns true if the environment is development or test. [more inside]
Easier nested layouts in Rails 7
I’ve been using a simple, 4-line helper method to implement nested layouts in Rails since I originally blogged about it in the Rails 4 days. The technique still works great after all these years! Today I updated my post for Rails 7. The code has now been tested from Rails 6.0 all the way to Rails edge.
Test-driven development in the age of artificial intelligence
Hi friends, I just added new content to Everyday Rails for the first time in nearly two years! Ruby is still my primary language, but sometimes I need to dip my toe into other languages and ecosystems. Here’s how ChatGPT, GitHub Copilot, and TDD made me a professional Go programmer in less than an hour. Kind of. Don’t worry, the post isn’t about Go, it’s about the process.
Ruby on Rails upgrade: "breaking changes" you might not expect
I’m working on a Rails upgrade for a giant monolith application. It’s been a while already, and while I’m encountering many issues trying to jump from 5.2+ right to 6.1, I want to share some of the stories. Link to post.
Your first Stimulus controller — learn Stimulus by building a Toggle
Hey RubyFlow! I’ve just published a beginner’s guide to learning Stimulus. We build a simple toggle controller, and I teach you some core concepts along the way.
3D & Robotics in Dragon Ruby with Kota Weaver | Rubber Duck Dev Show 90
In this episode, we discuss working with 3D and robotics in Dragon Ruby with Kota Weaver:
Glimmer DSL for WX (wxWidgets GUI Toolkit) Using wxruby3
Glimmer gets a new GUI DSL in 2023 called Glimmer DSL for WX (Early Alpha 0.0.5 was built in 1 day) to support the very mature wxWidgets GUI toolkit that renders cross-platform native GUI controls (using a brand new wxruby3 binding)! [more inside]
Using Rails Credentials in your Rails App
Did you know that Rails comes with a built-in credentials manager to replace .env variables? Heres how you can start using it —
If You Liked Shoes, You'll Love Glimmer!
A new Glimmer FAQ (Frequently Asked Questions) section has been added to the Glimmer project README on GitHub in order to answer questions like “How do Glimmer GUI DSLs compare to Shoes?” and “What is the difference between Glimmer and Glimmer DSL for SWT?”, among others. [more inside]
Rails design patterns - the big picture
Rails 7 extends enum support for the Postgres adapter
Renaming the enum, adding and renaming the values of the enum made easier with the latest changes to the Postgres adapter in Rails 7 [more inside]
Tips for writing Rails tasks with Thor instead of Rake
Thor is a great way to write simple CLIs like one-off Rails scripts, but it does have its own gotchas. Here’s how to use Thor in practice.
Rails Console Tips and Tricks
Some tips and tricks to get the most out of the Rails console. [more inside]
How to get offline documentation for Ruby, Rails and your gems
The latest issue of Rails Tricks is out! It covers how to get offline documentation for Ruby, Rails, and your gems in case you take a laptop on your vacation.
Pundit testing approaches compared
I am an old-time CanCanCan user and recently started to consider switching to Pundit. I am also a big fan of RSpec. Given how important Authorization (AuthZ) is, I want to test it properly. [more inside]
Intro to Propshaft: A new asset pipeline for Rails
Explore the future of asset pipelines in Rails with Propshaft! Discover how this cutting-edge technology enhances the management and delivery of assets while simplifying your development workflow.
The Future of Dragon Ruby with Amir Rajan | Rubber Duck Dev Show 89
In this episode, we discuss the future of Dragon Ruby with Amir Rajan: