How to add methods to use in Rails Console [Rails 8]

Question

I'm having a hard time figuring out how to add helper methods (unrelated to views) that I can access in the console, now that Rails::ConsoleMethods is gone. Simply defining them in the console block—the strategy given in The Rails 8 Way—doesn't work. And all the blog posts I'm turning up about the change are dead, even though they're only months old.

What is the expected approach for this, now?

Posted Aug 14, 2025, 12:35 AM UTC

98
Loading comments…