How to Use ‘rails about’ to Explore Your Rails Project Stack

Every time I need information about a project, like the Rails/Ruby version, database adapter, RubyGems version, or JavaScript runtime, I start opening files and checking everything by hand 🫠.

Today I learned there is a command to do this:

rails about

This will give you something like this:

About your application's environment
Rails version 7.1.3.4
Ruby version ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [arm64-darwin23]
RubyGems version 3.5.11
Rack version 3.1.5
JavaScript Runtime Node.js (V8)
Middleware: Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Sprockets::Rails::QuietAssets, Rails::Rack::Logger, ActionDispatch::ShowExceptions, WebConsole::Middleware, ActionDispatch::DebugExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, Rack::Head, Rack::ConditionalGet, Rack::ETag
Application root /home/foobar/my_app
Environment development
Database adapter postgresql
Database schema version 20240730170935

I found this command extremely useful when you want to quickly check if a security patch affects your project.

I’ve been working with Rails for more than a decade, and it’s great to find new things every day. I hope you find this handy command as useful as I did.

Unagi is a software boutique that offers software development services in Ruby on Rails, a stack we still choose after +12 years. Check out more on our social media.