r/rails • • 4h ago

💼 jobs megathread Work it Wednesday: Who is hiring? Who is looking?

4 Upvotes

FORMAT HAS CHANGED PLEASE READ FULL DESCRIPTION

This thread will be periodically stickied to the top of the sub for improved visibility.

You can also find older posts again via the Megathreads" list, which is a dropdown at the top of the page on new Reddit, and a section in the sidebar under "Useful Links" on old Reddit.

For job seekers

Please adhere to the following rules when posting: Rules for individuals:

  • Don't create top-level comments; those are for employers.
  • Feel free to reply to top-level comments with on-topic questions.
  • Anyone seeking work should reply to my stickied top-level comment.
  • Meta-discussion should be reserved for the distinguished comment at the very bottom.

You don't need to follow a strict template, but consider the relevant sections of the employer template. As an example:

    TYPE: [Full time, part time, internship, contract, etc.]
    
    LOCATION: [Mention whether you care about location/remote/visa]
    
    LINKS: [LinkedIn, GitHub, blog, etc.]

    DESCRIPTION: [Briefly describe your experience. Not a full resume; send that after you've been contacted)]

    Contact: [How can someone get in touch with you?]

Rules for employers:

  • The ordering of fields in the template has been revised to make postings easier to read.
  • To make a top-level comment, you must be hiring directly; no third-party recruiters.
  • One top-level comment per employer. If you have multiple job openings, please consolidate their descriptions or mention them in replies to your own top-level comment.
  • Proofread your comment after posting it and edit it if necessary to correct mistakes.
  • To share the space fairly with other postings and keep the thread pleasant to browse, we ask that you try to limit your posting to either 50 lines or 500 words, whichever comes first.
  • We reserve the right to remove egregiously long postings. However, this only applies to the content of this thread; you can link to a job page elsewhere with more detail if you like.

Please base your comment on the following template:

    COMPANY: [Company name; optionally link to your company's website or careers page.]

    TYPE: [Full-time, part-time, internship, contract, etc.]

    LOCATION: [Where are your office or offices located? If your workplace language isn't English-speaking, please specify it.]

    REMOTE: [Do you offer the option of working remotely? Please state clearly if remote work is restricted to certain regions or time zones, or if availability within a certain time of day is expected or required.]

    VISA: [Does your company sponsor visas?]

    DESCRIPTION: [What does your company do, and what are you using Rust for? How much experience are you seeking, and what seniority levels are you hiring for? The more details, the better. If you are listing several positions in the "Description" field above, then feel free to include this information inline above, and put "See above" in this field.]

    ESTIMATED COMPENSATION: [Be courteous to your potential future colleagues by attempting to provide at least a rough expectation of wages/salary. See section below for more information.]

    CONTACT: [How can someone get in touch with you?]

ESTIMATED COMPENSATION (Continued)

If compensation is negotiable, please attempt to provide at least a base estimate from which to begin negotiations. If compensation is highly variable, then feel free to provide a range.

If compensation is expected to be offset by other benefits, then please include that information here as well. If you don't have firm numbers but do have relative expectations of candidate expertise (e.g. entry-level, senior), then you may include that here. If you truly have no information, then put "Uncertain" here.

Note that many jurisdictions (including several U.S. states) require salary ranges on job postings by law. If your company is based in one of these locations or you plan to hire employees who reside in any of these locations, you are likely subject to these laws. Other jurisdictions may require salary information to be available upon request or be provided after the first interview. To avoid issues, we recommend that all postings provide salary information.

You must state clearly in your posting if you are planning to compensate employees partially or fully in something other than fiat currency (e.g., cryptocurrency, stock options, equity, etc). Do not put just "Uncertain" in this case, as the default assumption is that the compensation will be 100% fiat. Postings that fail to comply will be removed. Thank you.


r/rails • • 23h ago

Discussion Improving jemalloc's memory use

Post image
22 Upvotes

Long-running Rails 8.1 app (Ruby 4.0, Puma single mode, 5 threads, jemalloc) on a 512 MB Heroku dyno had a slow native memory creep for over a year. Ruby's object count stayed flat while RSS kept climbing, sometimes to the point of swapping or crashing. The chart shows the before and after. On the left, jemalloc's allocated memory saws upward toward 400+ MB between restarts. What fixed most of it was forcing a full GC every 300 seconds in Puma's out-of-band hook, between requests, so it never adds latency.

After that I set RUBY_GC_HEAP_FREE_SLOTS_MIN_RATIO=0.10, GOAL_RATIO=0.15 and MAX_RATIO=0.25 so Ruby keeps less empty heap around. Allocated memory now sits flat around 200 to 240 MB, and boot memory dropped by another 35 MB. RSS growth went from about 25 MB/h to 2 or 3 MB/h, and p95 latency actually went down. Next I'm trying min threads = max threads to stop Puma from creating and reaping threads all day.


r/rails • • 22h ago

Discussion I think `String#truncate_words` uses ~48 bytes of native memory per character after the cut point (one-line fix inside)

17 Upvotes

UPDATE: It also speeds up long string handling 10-100x. PR is now up. https://github.com/rails/rails/pull/59848

We build meta descriptions from long legal texts, some up to 1.25M characters, by calling #truncate_words. While chasing a slow RSS creep in production, I found that a single call on one of those strings peaks at about 58 MB of RSS with glibc, or 70 MB with jemalloc. None of it showed up in GC.stat or allocation profilers.

I believe the cause is the tail of the regex in ActiveSupport:

if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)#{sep}.*/m

Once the Nth word and its separator are found, .* under /m goes on to match the whole rest of the string, and Onigmo pushes a backtrack entry for every character it consumes.

That stack is plain malloc, so you only see it as RSS. The .* never affects the result, because it can match an empty remainder and it isn't part of the capture. A lookahead does the same job:

-    if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)#{sep}.*/m
+    if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)(?=#{sep})/m

Peak RSS during one call (fresh process per case, Ruby 4.0.9, x86_64 Linux) and time from benchmark-ips:

LengthPeak RSS (before → after)Time (before → after)
1 K52 KB → 09.6 µs → 6.3 µs
100 K4.7 MB → 0295 µs → 6.5 µs
1 M47 MB → 013.2 ms → 6.1 µs

PS: My workaround is to use a split-based helper instead of truncate_words.


r/rails • • 21h ago

Podcast 🎙️ Remote Ruby – Rails Security, Hot Cell, and AI-Generated PRs

Thumbnail remoteruby.com
5 Upvotes

New Remote Ruby episode is out!

This week Chris, David, and I get into:

- Recent Rails security fixes, including Active Storage vulnerabilities
- Hot Cell and safer file uploads
- Unexpected changes in Rails content negotiation
- My new five-file rule for keeping AI-generated PRs reviewable
- Using stacked PRs and parallel AI coding sessions

I am curious how others are keeping AI-generated PRs manageable?


r/rails • • 1d ago

Minitest Rails Guide - a free hands-on guide for testing Rails apps with Minitest

Thumbnail minitestrails.com
14 Upvotes

For the last few months, I have been writing a free hand-on guide for automated testing using Rails default stack: Minitest + Fixtures.

Following the guide chapter by chapter, you build a real app for managing recipes called Cookbook while learning how to test different parts of the Rails application along the way.

It's a guide I wish I had when I started learning automated testing with Rails six years ago.

If you want your AI agents to go through it and instill the learning from the guide, you can point it to https://minitestrails.com/llms.txt . Every chapter also has a markdown version (just add .md to the chapter URL).

Feedback welcome!

If you see a topic missing, let me know in the comments. I will consider adding it.


r/rails • • 1d ago

Learning Fixing a persistent production issue in a Rails eCommerce app

0 Upvotes

Maintaining an established Rails app often means investigating problems that have been around for a while: recurring production errors, slow queries, or behaviour nobody can quite explain.

Our teammate Samuel Ebeagu wrote up how he investigated and fixed one such issue in an eCommerce app: https://widefix.com/blog/fixing-slow-delayed-job-queues-rails-heroku/

The post covers the investigation, the root cause, and the fix. Thanks to Yasir Guzman for reviewing it.


r/rails • • 2d ago

Rails + Inertia.js users: what downsides have you hit, and did any make you reconsider it?

17 Upvotes

I'm using Inertia.js with Rails and React on a side project, and so far I like it: controllers stay server-driven, there's no separate API to maintain, and routing stays in Rails.

Most of what I read about Inertia is positive though, so I'd like to hear the other side from people who've used it for a while or in production.

- What were the real downsides you ran into?

- Was there a point where it got in your way, like a feature that was awkward to build, performance, SSR, testing, or something else?

- Did anyone move away from it, or decide not to use it on a later project? What made you choose differently?

- If you'd start the same project again today, would you pick Inertia, Hotwire, or a separate API plus SPA?

Not looking to start a framework war, just want to know the trade-offs before the project grows.


r/rails • • 2d ago

Gem Rabarber v6.1: Reliability Update for the Rails Authorization Gem

6 Upvotes

Rabarber, a role-based authorization gem for Rails, releases v6.1.0.

This release is mostly about reliability. With the help of AI, a lot of work went into the internals, and many edge cases around transactions, caching, concurrent role changes and generated migrations were found and fixed. Updating is recommended for everyone.

This version also adds a way to create and delete several roles at once, and support for binary UUID primary keys in MySQL.

A few things are deprecated in this release. They still work for now, but will be removed in the next major version, planned for next year.

Details on these and all other changes are in the changelog.

Check out the gem here.

Happy coding!


r/rails • • 2d ago

The future of Rails

0 Upvotes

DHH gave a hint at Kaigi on Rails on the future of Rails.

Hint: Do Repeat Yourself

https://www.youtube.com/watch?v=ayVzHr75gls


r/rails • • 3d ago

Group Rails models, jobs and services by domain in an architecture test

0 Upvotes

A billing boundary rarely lives in one directory. You can have app/models/billing/, app/jobs/billing/ and app/services/billing/, and still want all of them to count as the same component.

One useful application of ArchUnitRuby's slices is grouping those paths by the domain name instead of by their Rails role. I work on the library; it's free and MIT-licensed.

require 'archunit'

slices = ArchUnit.project_slices('.')
  .defined_by_regex(%r{app/(?:models|jobs|services)/([^/]+)/})

diagram = <<~UML
  @startuml
  component [orders]
  component [billing]
  [orders] --> [billing]
  @enduml
UML

rule = slices.should
             .ignoring_external_slices
             .adhere_to_diagram(diagram)

options = ArchUnit::CheckOptions.new(
  dependency_analysis: :imports_and_constants
)
ArchUnit.assert_passes(rule, options)

The first regex capture becomes the component name. So a job under orders referring to Billing::Invoice is allowed. A billing model referring to its own Billing::InvoiceBuilder service is also allowed, even though those files live under different Rails directories.

But add a reference to Orders::ReceiptJob inside the billing model and the check reports a billing -> orders dependency, including the source file and constant-reference evidence.

That's the boundary I care about here

You can move behavior between a domain's model and service without changing the cross-domain policy. If billing needs to start reaching into orders, the diagram change makes that decision explicit.

This is static source analysis with constant references enabled, not a Rails runtime or callback check. The example covers the directories named in the regex, and uncertain constant ownership isn't guessed. The API is available in archunit 1.0.0: https://github.com/dragonsec-ai/ArchUnitRuby

Writing assisted by ChatGPT.


r/rails • • 3d ago

Skylight, Honey Badger, App Signal, Scout: they all suck.

0 Upvotes

tldr; Rollbar's ok as a Sentry alternative. All the others are too buggy for me.

Initial threshold:

  • If they have a blog, its current.
  • They use product language I understand as a developer.
NameCost for 1M req's.ErrorsAPMLogsCache Insight
Rollbar$20✅❌❌❌
Skylight$20❌✅❌❌
Honey Badger$30✅✅✅Didn't work
App Signal$40✅✅✅❌
Scout$40✅✅✅

Skylight

  • It shows allocations in a file even though I know the file isn't running because I'm caching it with a hash.
  • Graphs are incorrectly drawn and inaccurate.

HoneyBadger

  • Extra work (with Vector) required to get import logs.
  • Many Dashboard Widgets don't work, such as Cache Hit Rates and all Puma Widgets.

    • For Puma, need to add: plugin :honeybadger
  • Errors aren't showing up. (Maybe ActiveRecord errors are ignored by default?)
  • The table views hide much of the data and can't be horizontally scrolled.
  • It's unintuitive to scroll tables down. One must first move the mouse into the hard-to-see scroll pane. (Cf.: Skylight, which doesn't have this problem.)
  • The docs aren't very hyperlinked and the left navbar doesn't stay synced with the content. This makes it hard to navigate and find material.
  • Many of the Widgets feel very generic and not particularly helpful. They feel useless and time wasting in an enterprisey way.

AppSignal

  • 😃 Deploys automatically recognized.
  • 👎 Can't dive into details for allocations and other aspects. The info feels very surface-level. Although, it seems to have been slimmed down to show only the most important details.
  • 👎 I began getting frequent intermittent page outages.

Scout APM

  • 😃 Pre-written config file to get started.
  • 😃 Has Rollbar integration. I may use that if I prefer it to the Scout error tracking.

Update, 2026-11-14: Scout APM had multiple bugs when trying it via Heroku.

  • Lots of data missing, although DEBUG mode shows it being sent from my app.
  • Its GitHub release syncing stayed stuck on an older commit.

Removing it.


r/rails • • 5d ago

Podcast Marco Roth: Teaching Rails to Read Its Own Template

23 Upvotes

There's a new episode of On Rails out today with Marco Roth where we dig into some of the work he's been doing with Herb and ReActionView... and a bunch of other topics I really wanted to ask about... like, how do you navigate so much conference travel?

Listen in your favorite (or most bearable) podcasting app... or watch the conversation over on the official Rails youtube channel.

https://www.youtube.com/watch?v=ko60zbx6dOE

https://podcast.rubyonrails.org/2462975/episodes/20121188-marco-roth-teaching-rails-to-read-its-own-template

Happy Friday!

✌️


r/rails • • 4d ago

Open source Free and Open Source Error Tracking, APM, and Uptime monitoring in Ruby on Rails

Thumbnail gallery
7 Upvotes

r/rails • • 4d ago

Learning Used Kamal to deploy my Rails side project and it just worked

Post image
0 Upvotes

r/rails • • 5d ago

Open source kamal-watch 0.9.1 released

6 Upvotes

Small QoL update regarding reboot functionality.

Side note: I couldn't find any rules against posting more than once a week, but if there are rules about something similar, please let me know.


r/rails • • 4d ago

Catch a presentation mixin leaking into a Rails model without a require line

0 Upvotes

A Rails model can pick up a presentation dependency through include Presentation::FormattedOrder without adding a require_relative anywhere. An import-only check can miss the relationship you actually care about.

I maintain ArchUnitRuby. There is an opt-in mode that adds known project constant references to the dependency graph:

options = ArchUnit::CheckOptions.new(
  dependency_analysis: :imports_and_constants
)
rule = ArchUnit.project_files
  .in_path('app/models/**')
  .should_not.depend_on_files
  .in_path('app/presentation/**')

ArchUnit.assert_passes(rule, options)

Require archunit in the test setup and adapt the two paths to your app.

I verified this with a model including a root-qualified presentation mixin. Import-only mode found no edge; the expanded mode reported the dependency. Removing the mixin made the rule pass.

That gives you a check for a real autoloading case without booting Rails to collect runtime references. It is still static analysis: dynamic constant definitions and ambiguous ownership have documented limits.

Disclosure: this post was drafted with AI assistance; the example was checked against the published gem.

Source: https://github.com/dragonsec-ai/ArchUnitRuby


r/rails • • 5d ago

Steadfast Update I - The Baseline

Thumbnail noteflakes.com
6 Upvotes

r/rails • • 5d ago

Open source Autoloading can remove a require without removing the architectural dependency

0 Upvotes

I created and maintain ArchUnitRuby. Writing assisted by AI.

One thing I wanted to avoid in an architecture test was confusing “no explicit require” with

“no dependency.” These are different spellings of a relationship:

require_relative '../retrieval/store'

Retrieval::Store.new

In an autoloaded application, the second spelling is ordinary Ruby. If your team has decided

that a controller or API component shouldn't know about that implementation, an import-only

rule isn't the complete policy you meant to write.

ArchUnitRuby 1.0 can combine file-load edges and known project constant references through

`dependency_analysis: :imports_and_constants`. That mode is opt-in. The resulting graph can

be checked from the normal Ruby test suite.

This isn't a claim to understand every Rails association, callback, reflection path or

metaprogrammed reference. Packwerk's package workflow and ArchSpec's component/convention

rules also serve useful needs; this approach is about a test-native graph policy.

[Tested release and source]

For a Rails boundary you actually maintain, would file-load edges and constant references

express enough of the policy, or is the important coupling somewhere else?


r/rails • • 6d ago

rails-jsdom: a near drop-in replacement for system tests in Hotwire apps, no browser needed

26 Upvotes

Most of my system tests only check Stimulus and Turbo behavior: click something, a frame updates, a stream appends a row. For that you don't need Chrome, Puma or Capybara waiting for the page to settle.

rails-jsdom runs those same tests without a browser. It aims to match the system test API, so converting is mostly a matter of changing the parent class:

# before
class CartTest < ApplicationSystemTestCase

# after
class CartTest < RailsJsdom::TestCase

The test bodies stay the same. These all work as you'd expect:

  • visit, click_on, fill_in, check, select, attach_file, send_keys
  • within, find, all
  • accept_confirm, using_session
  • assert_text, assert_selector, assert_current_path, along with the rest of the assert_* and has_*? methods

The README has a table listing every system test method and its status, as well as cases where you'd need to keep system tests.

Under the hood:

  • Your real pages render through Rails. Your real Stimulus controllers and Turbo run in jsdom, bundled from your importmap.
  • Every request the page makes goes back to Rails in the same process, with the test's session.
  • Timers run on a virtual clock and the runner waits for pending requests itself, so you can delete your sleeps and wait tweaks.
  • JS errors and unexpected dialogs fail the test.
  • Turbo Stream broadcasts reach the page.

It's an ActionDispatch::IntegrationTest underneath, so fixtures and perform_enqueued_jobs work. It can be as much as 4–10x faster than the same tests as system tests.

This is my first cut at this and has been applied to my real projects but please try it out and let me know the results..

https://jakehow.github.io/rails-jsdom/

https://github.com/jakehow/rails-jsdom


r/rails • • 5d ago

Question The best static site generator (SSG) for Rails?

Thumbnail perron.railsdesigner.com
3 Upvotes

What do you think of this static site generator (SSG) called Perron, which can be integrated directly into Rails and reuse most of its existing tools?

I’ve always preferred keeping everything within a single language—which is why I’ve generally passed on other options—but in the Ruby ecosystem, I haven’t found anything that convinced me as much as this project. Has anyone tried it? Are you interested in it? Would you recommend it? Thanks! 😃


r/rails • • 6d ago

I made a gem that keeps pgvector embeddings in sync with your ActiveRecord models

5 Upvotes

I've been adding semantic search to Rails apps with pgvector and neighbor, and kept writing the same glue code every time:

  • an after_save that calls the embeddings API, even when the text didn't change
  • embeddings going stale when someone edits a record through a path that skips the callback
  • a one-off script to backfill existing rows without hitting rate limits
  • figuring out which rows need re-embedding after switching models

So I pulled it into a gem called embed_sync:

class Product < ApplicationRecord
  has_neighbors :embedding
  has_embedding :embedding, from: %i[name description]
end

Product.create!(name: "Trail runner", description: "Waterproof running shoe")  # embedded in a background job
Product.semantic_search("shoes for rainy hikes", limit: 5)

What it does:

  • re-embeds in a background job only when the source text changes (it stores a digest, so unchanged saves don't call the API)
  • bin/rails embed_sync:backfill embeds existing rows in batches, and you can stop and rerun it safely
  • detects model or dimension changes and marks those rows stale
  • embed_sync:stale shows how many records are missing or out of date
  • uses ruby_llm by default, but any object with #embed(texts, model:) works as a provider

It works with Rails 7.1 to 8.1 and Ruby 3.2+. I tested it against a real app with Postgres, Solid Queue and a local Ollama model before releasing.

It's still early (v0.1.0), so I'd really like feedback. Does the API feel right? What's missing for your use case? Are there edge cases I haven't thought of?

GitHub: https://github.com/Umair0092/embed_sync RubyGems: https://rubygems.org/gems/embed_sync


r/rails • • 7d ago

Build polished Stripe-style UIs in Rails + Tailwind

6 Upvotes

TL;DR: https://windframe.dev/styles/stripe

Hi everyone 👋

I’ve been experimenting with generating interfaces inspired by Stripe’s design taste, combining crisp typography, generous spacing and bold gradients to make complex products feel clear and polished.

I ended up building a UI system that makes it really easy to generate interfaces using this design style when prompted, and it does so consistently. It generates both full UIs and assets that match the Stripe's design style

I also put together a template built around this style that you can use directly in your Rails projects as starting points.
You can access the template here
https://windframe.dev/styles/stripe

I made this a selectable style option when generating UIs on Windframe, so that when you can choose this preset style it gives your Rails interfaces that clean, polished look.

If you’re not familiar with Windframe, it’s an AI visual editor that lets you generate polished UI with AI, tweak it visually in a canvas, and export clean production code in Rails (along with HTML, and other frameworks)

Appreciate any feedback or thoughts :)


r/rails • • 7d ago

Discussion Going all-in on Sorbet

Thumbnail docspring.com
23 Upvotes