皆様こんにちは、メドピアのサーバーサイドエンジニアの内藤(@naitoh)です。 社内の OpenID Connect Authorization Server を Golang 実装から Rails 実装にリプレイスしたので、技術ブログで紹介させていただきます。 前提 OpenID Connect は OAuth 2.0 認可プロセスを拡張し、認証目的で利用できるようにしたものになります。 Authorization Server は OpenID Provider (以下OP) とも呼ばれ、OpenID Conn...| メドピア開発者ブログ
Rails World 2025 参加レポート こんにちは、hsbtです。Ghost of Yōtei の発売日が近づいてきて、北海道出身者として羊蹄山や各エリアがどのように表現されるかを待ちきれない日が続いています。羊蹄山、といえば子供の頃に父親と一緒に登頂し、霧で何も見えなかった山頂付近が山小屋で休憩したあとはとても綺麗な景色が広がっていた、という記憶がうっすらとあります。...| ANDPAD Tech Blog
Ruby Central's Q&A happened, but the real story emerged from a board member's confession and a maintainer's devastating rebuttal revealing the full scope of the governance breakdown.| Seuros Blog - Navigation Logs from the Ruby Nebula
Scale your Rails app without rewrites. Learn to keep business logic in Ruby and delegate heavy work to specialized tools, built with Go, C, and Rust, for performance and scalability.| Evil Martians
Explore how the Active Agent library brings Rails conventions to AI development, with real-world examples from Evil Martians' early adoption experience| evilmartians.com
Rails enums are a great way to model things like a status on an ActiveRecord model. They provide a set of human-readable methods while storing the result as an integer in the database.| Boring Rails: Skip the bullshit and ship fast |
When building features that accept user-generated content, you may need to display dynamic content based on what the user specifies. Imagine you want to users to be able to customize a welcome message sent from your application when they invite someone to their account.| Boring Rails: Skip the bullshit and ship fast |
Environment variables are a great way to configure your Rails apps. You can use the Rails.env variable to conditionally change behavior when you are in development/test or production. And you can add your own application specific variables for things like API tokens or global settings.| Boring Rails: Skip the bullshit and ship fast |
One of the most common Rails tips is to back up your ActiveRecord model validations with database level constraints.| Boring Rails: Skip the bullshit and ship fast |
A common question you may want to answer on user-input data is: what values have been entered and how many times is each one used?| Boring Rails: Skip the bullshit and ship fast |
In almost all email programs, you can add a display name before your email address like so:| Boring Rails: Skip the bullshit and ship fast |
Custom Rails helpers modules are often overlooked, but they can be a great option for building lightweight components and reducing boilerplate in your Stimulus controllers.| Boring Rails: Skip the bullshit and ship fast |
Often you’ll have an application screen like this:| Boring Rails: Skip the bullshit and ship fast |
Hotwire is a new suite of frontend tools from Basecamp for building “reactive Rails” apps while writing a minimal amount of JavaScript.| Boring Rails: Skip the bullshit and ship fast |
If you’re trying to write a tricky ActiveRecord query that includes joins, complex where clauses, or selecting specific values across tables, it can be hard to remember every part of the ActiveRecord DSL.| Boring Rails: Skip the bullshit and ship fast |
One of the best parts about ActiveRecord is the chainable query interface:| Boring Rails: Skip the bullshit and ship fast |
It’s a great idea to make your database and application validations match. If you have validates :name, presence: true in your model, you should pair it with a not null database constraint. Unique validations should be paired with a UNIQUE database index.| Boring Rails: Skip the bullshit and ship fast |
Breadcrumbs are a common UI pattern in most software applications. Rails has no built-in tools specifically for breadcrumbs, and while thereare ahandfulof existinggems, I think this is something you can easily implement in your own app with just a few lines of code.| Boring Rails: Skip the bullshit and ship fast |
If you follow a strict REST / nested resources approach to building your Rails app, you might get sick of repeating common controller actions.| Boring Rails: Skip the bullshit and ship fast |
Sometimes want to skip certain validations on your database models. Maybe you have a multi-step wizard or want admins to have more freedom in changing data.| Boring Rails: Skip the bullshit and ship fast |
You can’t prove a negative, but what about querying a database for a negative? While the majority of the time you are writing queries to find data, there are some cases when you want the opposite: writing a query that looks for the absence of data.| Boring Rails: Skip the bullshit and ship fast |
Sometimes a feature in your application will involve a back-and-forth between multiple users. When it comes time to write an automated system test, you can easily simulate switching between users using Capybara’s using_session helper.| Boring Rails: Skip the bullshit and ship fast |
Rails has a great, expressive term called pluck that allows you to grab a subset of data from a record. You can use this on ActiveRecord models to return one (or a few) columns.| Boring Rails: Skip the bullshit and ship fast |
When it comes to compare dates, for some reason my brain really struggles. I mix up < and >= all the time and end up flipping them.| Boring Rails: Skip the bullshit and ship fast |
It’s common to use environment variables to configure external services or other options in a Rails app. These ENV_VARS usually are not checked into source control, but rather configured per environment.| Boring Rails: Skip the bullshit and ship fast |
A common practice in Rails apps is to extract logic into plain-old Ruby objects (POROs). But often you are passing data to these objects directly from controller params and the data comes in as strings.| Boring Rails: Skip the bullshit and ship fast |
The Rails helper excerpt can extract a chunk of text that matches a certain phrase, no matter where in the string it is.| Boring Rails: Skip the bullshit and ship fast |
We’re all familiar with the classic Rails link_to helper. But did you know there is a link_to_unless_current variant?| Boring Rails: Skip the bullshit and ship fast |
Sometimes you need to keep track of how many times you’ve looped when rendering some views, for instance to alternate background colors to create a “striped” table.| Boring Rails: Skip the bullshit and ship fast |
Use the Rails highlight helper to wrap search result matches in <mark> tags.| Boring Rails: Skip the bullshit and ship fast |
How the observability industry's vendor lock-in tactics led to building Lapsoss and the Liberation Stack - community-owned tools that put developers back in control| Seuros Blog - Navigation Logs from the Ruby Nebula
Atlas Monkey crew discovers that Rails.env has been deceiving developers since 2004. When mining colonies report phantom deployment bugs across multiple "production" environments, ARIA uncovers how 847+ gems create behavioral chaos because they can't distinguish between staging, sandbox, and actual production. Captain Seuros deploys the rails_app_version Environmental Truth Protocol to end the deception.| Seuros Blog - Navigation Logs from the Ruby Nebula
When a quantum shapeshifter infiltrates the Federation's antimatter supply chain, Captain Cyrel of the USS ActiveCypher must use graph database technology to track an enemy that exists in relationships, not rows. A thrilling tale of how ActiveCypher brings Rails conventions to the graph database revolution.| Seuros Blog - Navigation Logs from the Ruby Nebula
Evil Martians cut Whop’s Rails test suite and CI time in half using profiling, factory optimizations, and parallelization. Learn how we speed up tests and boost reliability.| Evil Martians
If you’re the Acting Ensign Crusher of Rails developers, you’ve probably heard about background jobs but are a little lost. They’re essential for building modern, responsive applications. But let’s be honest, the thought of adding another service to your stack can be daunting. Redis is great, but it’s another thing to manage, another thing to […]| dominickm.com
Attended my first and last RailsConf in Philadelphia. The 36°C heat was brutal, but the conversations were worth it. Some observations about our aging community and why AI might be bad news for open source innovation.| Closer to Code
Rails isn’t dead, it’s thriving. Learn how Ruby on Rails survived the hype cycle, why startups like Chime and Figma still bet on it, and what it means for your next project.| Evil Martians
Introducing Redprints CFP, an open source CFP management application built for the SF Ruby Conference with Rails and Inertia.js.| Evil Martians
The golden rule for libraries is to support integration with as many parent apps as possible because you want to cover as much as you can of the full spectrum of customers.| avohq.io
The unfiltered story of Rails Lens: ten years of frustration, harassment, theft, and finally breaking free to build something better. From TOML discoveries to AI validation, this is how persistence beats pattern parasites.| Seuros Blog
After 12 years maintaining state_machines, I dropped Rails 7.1 support. This is the story of why forever backward compatibility kills innovation and how I'm building for the future, not maintaining the past.| Seuros Blog
How working with JRuby 10 and Rails 8 changed my perspective on the JVM, one reluctant commit at a time.| Seuros Blog
How I escaped the zoo of monkey patches and built a clean, Rails 8-friendly PostGIS adapter gem that actually works with modern Rails.| Seuros Blog
Rails AppVersion provides a standard way to handle version and environment information in Rails apps with best practices for deployment.| Seuros Blog
NoFlyList automatically detects your database type and uses specific optimization strategies to make tag queries blazingly fast.| Seuros Blog
Tag parsing seems simple until you handle real user input. Explore how NoFlyList's custom screening prevents malicious and spam tags.| Seuros Blog
Learn when to use polymorphic vs model-specific tags by building a blog platform. Understand the trade-offs and performance implications.| Seuros Blog
From technical debt in Acts-as-Taggable-On to production-ready NoFlyList: a journey of building cleaner, faster tagging for Rails apps.| Seuros Blog
Capturing the spirit of the Rails community and celebrating the end of an era| www.beflagrant.com
Has simplicity gone missing in web development? This investigative piece uncovers how Inertia.js + Rails defy JavaScript bloat and reclaim developer sanity.| Evil Martians
This year at the final RailsConf, the atmosphere was incredibly nostalgic and celebratory, if perhaps a little bittersweet. Many of the talks spent time looking back on how far we've come, including Robby Russell's "The Rails Features We Loved, Lost, and Laughed At". Robby's talk brought back to light an old library that I hadn't thought about or used in years, ActiveResource. Once it was mentioned, it seemed like it kept cropping up during the conference, from DHH's fireside chat, to convers...| Hashrocket
Generators are one of the many excellent tools that Rails provides. They can be used for a wide range of tasks, from plugging a gem into your app to scaffolding files. You can also build generators to meet your specific needs.| hashrocket.com
Introducing Passive Queue - the Rails background job adapter that achieves perfect zen through non-execution. 100% success rate, 0ms processing time, infinite scalability.| Closer to Code
こんにちは、wai-doiです。 今回は、開発中の Rails アプリケーションで bin/rails generate model を実行した際に ActiveRecord::PendingMigrationError が発生したため、その原因と対処法を調べました。 起こったこと そのアプリケーションでは、テーブルとモデルを追加するために bin/rails generate model コマンドを実行すると、ActiveRecord::PendingMigrationError のエラーが出ていました。 以下はそ...| ESM アジャイル事業部 開発者ブログ
Hey Rails devs! 👋 If you’re using Active Storage in your Ruby on Rails applications (and let’s be honest, it’s pretty awesome for handling file uploads!), you’ve probably experienced its power and simplicity. But have you ever wished you could easily see what’s going on under the hood? Like, a proper dashboard to visualize your blobs, attachments, and overall storage usage?| Giovanni Panasiti - Personal Website and Blog
こんにちは。Nintendo Switch 2 を日本版で買うか多言語版で買うか悩んでいる @junk0612です。 RubyKaigi 2025 の開催がいよいよ近づいてきました。スケジュールが発表され、スポンサーイベントも出揃ってきています。 ESM でも ESM Drinkup at RubyKaigi 2025 を開催予定です (告知はこちら)。 esminc.doorkeeper.jp ですが、今年はこれだけではありません。まずは、こちらをご覧ください (ニン...| ESM アジャイル事業部 開発者ブログ
Ruby 3.4 starts the transition to frozen string literals by default. Here's what changes, why you should care, and how to prepare your Rails app.| Prateek Codes - Learn Building Scalable Backend Systems
Nithin Bekal's blog about programming - Ruby, Rails, Vim, Elixir.| nithinbekal.com
Read about the techniques and tools we used to build a slick-looking interactive multi-step form with Rails and Hotwire for one of our clients.| Evil Martians
How we used Bolt.new and AI to launch sfruby.com in days, building a cool and high-converting site for SF Ruby Conf with Astro, OKLCH, and some Martian flair.| Evil Martians
What I published this week about Ruby: newsletters, contributions, and scripts| All about coding
Join Friendly.rb in Bucharest, September 2024 for Ruby talks, networking, and fun activities. Don't miss this Ruby conference!| All about coding
Learn about hash value omission in Ruby, their benefits, examples, and implementation guidelines for more concise code| All about coding
Quick introduction to the endless method in Ruby, exploring use cases and potential impacts on code structure| All about coding
Last week I joined Ben and Josh on Founder Quest to recap RailsConf 2024. As you already know, we had a blast at RailsConf. But even if you read the article, give the podcast episode a listen as we cover more details and several non-RailsConf related items. I also really| John Nunemaker
こんにちは。サーバーサイドエンジニアの佐藤太一(@teach_kaiju)です。 今回の「ClinPeerアプリ開発の裏側連載記事」ではサーバーサイドにおける、フィーチャーフラグの実装方法を紹介します。 tech.medpeer.co.jp 目次 フィーチャーフラグとは 機能の有効化 Feature#enabled? フラグの運用 features.yml フラグの新規追加 フラグの有効・無効の切り替え フラグの削除 条件付き有効化の...| メドピア開発者ブログ
This post explores how concerns with controller callbacks are ordered against other callbacks| Kevin Murphy
There have been a few positive, blog-worthy notes happening in my life the past few months. The first is that by the grace of God, I found actual full-time employment working with a wonderful team …| The Cat Fox Life
A fantastic feature of Turbo Rails is the ability to broadcast changes to a page. Each connected client can receive changes in real-time. However, it's a common problem to update content that is shown to many users, but the rendering of items is affected by user context. A recommendation to get around this is to only broadcast things that don't require that user context. Because we have Turbo, we can serve user-specific content in other ways. Let's examine our setup, and I'll explain how we c...| Hashrocket
The power of Rails with Turbo and Stimulus. With the imminent release of Rails 8 and the exciting new version of Hotwire's Turbo library, the buzz around Rails has been growing. Hotwire, which stands for 'HTML Over The Wire', encompasses the Turbo, Stimulus, and Strada libraries. Rails has integrated Turbo and Stimulus into the framework, providing a wealth of modern, high-speed functionality. Let's explore how these new additions, combined with some classic features, can make Rails the perfe...| Hashrocket
When I went to find the iconic books to learn the .NET stack I came to a shocking realization. There are too many books! 53 books; 30,656 pages; over 757 hours.| Kerrick Long's Blog - Articles about programming, learning, code, books, and ...
Turbo comes with turbo:before-stream-render but unfortunately doesn’t ship with the equivalent turbo:after-stream-render. Here’s how to run JavaScript after the stream renders.| Notes to self
See examples of using Ruby's Data class for creating value objects, removing boilerplate code, and enhancing API response handling| All about coding
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 またまた「ClinPeerアプリ開発の裏側連載記事」です。 tech.medpeer.co.jp 今回はClinPeerで活用しているRailsの ActiveSupport::ErrorReporter についてご紹介します。 目次 ActiveSupport::ErrorReporter とは なぜ ActiveSupport::ErrorReporter を使うのか 実行コンテキストの注入 なぜ ActiveSupport::ErrorReporter を使うのか(本当のメリット...| メドピア開発者ブログ
I recently got the chance to build a small internal tool for our team. And when it came time to deploy, I really wanted to try out Kamal, the new deployment tool built by Basecamp (37Signals). It was easier than I had first anticipated. Kamal is a CLI and deployment scripting tool that allows you to setup servers and subsequently deploy your app to them. You can use this to deploy many types of applications, you just need a Dockerfile and some changes to Kamal's configuration. It's different ...| hashrocket.com
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 N番目の「ClinPeerアプリ開発の裏側連載記事」でございます(連載記事を同時執筆しているため本記事が何番目になるのかもはや不明)。 tech.medpeer.co.jp 今回はClinPeerで実践した「Railsプロジェクトのオブザーバビリティ強化施策」の紹介記事になります。少しマイナーなネタですね。 目次 オブザーバビリ...| メドピア開発者ブログ
こんにちは! サーバーサイドエンジニアの伏見です。 弊社で新しくリリースした「ClinPeer」の裏側連載。 tech.medpeer.co.jp この記事では、サーバーサイドで導入したGem Maintenance Tasks について書いていきます。 導入のモチベーション 開発初期や今後の運用の中で、データマイグレーション*1を考える場面が多くなるだろうという考えがありました。 Rails ConsoleやRake Taskで運...| メドピア開発者ブログ
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 こちらでご案内した通り、弊社で新しくリリースした「ClinPeer」の裏側をご紹介します。 tech.medpeer.co.jp 今回は小ネタとして「Railsプロジェクトの設定値管理」についてご紹介します。 目次 設定値管理とは Railsプロジェクトでの設定値管理の選択肢 Settingslogic SettingsCabinet その他諸々Gem Rails標準 config_for co...| メドピア開発者ブログ
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 こちらでご案内した通り、弊社で新しくリリースした「ClinPeer」の裏側をご紹介します。 tech.medpeer.co.jp 今回はClinPeerのバックエンドについての簡単なシステム概要と選定技術の紹介編です。 2024-2025年にrails newをした新鮮なRailsプロジェクトの様子をお楽しみください。 目次 システム概要 rails stats Gemfile ...| メドピア開発者ブログ
こんにちは。サーバーサイドエンジニアの @atolix_です。 今回はメドピアで運用しているアプリケーションのkakariの監査ログをDB管理からS3管理に移行したので、その方法と手順について紹介したいと思います。 kakari.medpeer.jp 背景 従来kakariではAuditedを用いて、監査ログを専用のauditsテーブルに保管する処理を行っていました。 github.com # application_record.rb class ApplicationRecord ...| メドピア開発者ブログ
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 本日はRuby・Railsの話に限定せず、Amazon CloudFront を利用している方に役立つ情報をご提供します。 目次 はじめに 「X-Forwarded-For」を活用する方法 「CloudFront-Viewer-Address」を活用する方法 Railsエンジニアへ 注意点 おまけ 参考資料 はじめに 弊社は基本的にAWS上にRailsアプリケーションを構築しているため、CD...| メドピア開発者ブログ
サーバーサイドエンジニアの内藤(@naitoh) です。 Rails で構築された小規模な APIサーバー(Rails の API モードで構築したもの)で、Ruby 3.2 の YJITを有効化する事で性能アップすることができましたので、喜びを分かち合いたく共有させて頂きます。 shopify.engineering We’re able to measure real speedups ranging from 5% to 10% (depending on time of day) on our total end-to-end request completion time measu…| メドピア開発者ブログ
先日、携わっているサービスで一番大きいRailsアプリをRuby 3.2にアップデートし、YJITを有効化できました。 方針を検討した結果、今回はRails 6.1およびPsych 3系のままRuby 3.2にアップデートする戦略をとったため、その手順をまとめます。 先週にメインのサービスをRuby 3.2にしてYJITを有効にできました! 実際に速くなったし嬉しい大YJIT記念日だ🎉 https://t.co/Wkhc6fDfj9| shimoju.diary
Safely leverage PostgreSQL's asynchronous commit for significant performance gains| Shayon Mukherjee
While writing a project for Wilcox Tech that we hope to open source soon, I had reason to test the content (or, in some cases, presence) of tags in a Rails app. I came across a good s…| The Cat Fox Life
If you’ve been working with Ruby for more than five minutes, you’ve probably heard about modules. They’re a great way to share behavior across multiple classes without getting tangled in inheritance chains that resemble an over-leveled Zubat spamming Confuse Ray. But let’s make it real. Instead of talking about include and extend in the abstract, […]| dominickm.com
You may be learning Rails & you read that you have to create a “scaffold” to get your Rails application started… Easy! You can do this using the rails g scaffold command. But what is scaffolding? “Scaffolding is a temporary structure used to support a work crew to aid in the construction, maintenance and repair ... Read more The post What is Scaffolding in Ruby on Rails? appeared first on RubyGuides. Don't miss your free gift here :)| RubyGuides
What are helpers in Rails? A helper is a method that is (mostly) used in your Rails views to share reusable code. Rails comes with a set of built-in helper methods. One of these built-in helpers is| RubyGuides
Yesterday I posted that I’d resolved my new microblog POSSE1 posts from generating link previews on Mastodon and Bluesky. Today, I want to briefly run through how I managed that.| Hearthside by Caleb Hearth
Rails comes with a built-in support for saving and uploading files to S3 and S3-compatible storage services in Active Storage. Here’s how to set up Cloudflare R2.| Notes to self
Over the last few month's I've been diving much deeper into Ruby, going through the famous Eloquent Ruby book...| Jeff Morhous
ActiveRecord makes it really easy to tie models in a Rails app to...| Jeff Morhous
Have you started a rails app and your page has no styling even though you're using Tailwind classes...| Jeff Morhous
Like a lot of folks, I have a bad habit of starting projects and then completely abandoning them for the next big thing....| jeffmorhous.com
A derailment is said to take place when a vehicle (for example a train) runs off its rails. This does not necessarily mean that it leaves its track. Although many … Continue reading →|
Turbo is a great way to build user interfaces, but most Turbo forms have to wait for the server response. Here’s how I am adding a small loading spinner to the submit buttons to improve the UX.| Notes to self
This year, I want to expand the show in a new direction. I want to hear from startups and companies that are building with Rails. Today's episode feature John Nunemaker and Garrett Dimon who recently acquired Fireside.fm, the podcast hosting platform we use for this show.| The Ruby on Rails Podcast
Here’s how to implement autosaving for inline input fields the Hotwire way.| Notes to self
The Ruby on Rails template Business Class gets a whole new edition. Rails 8, new licencing, and improved CRUD generator.| Notes to self
Rails 8 comes with a built-in authentication generator. However, it doesn’t yet come with registrations. Here’s how to add them.| Notes to self