r/rails

▲ 18 r/rails+1 crossposts

Cut Rails boot time with require-profiler and this guide

This post introduces* a new profiler for Rails app, require-profiler, to get insights on what's happening during your Rails app's boot. Why does it matter? Well, check out the post to learn about that as well as some real-world examples of when cutting the boot time made difference.

* To be precise, the profiler has been introduced earlier this year at RubyKaigi but it grew much stronger since then.

evilmartians.com
u/palkan — 16 hours ago
▲ 26 r/rails

How are you deploying your rails app?

How does one deploy rails to their own server? Is everyone setting up their server manually?

I don't want to provision my server or figure out configuration files or CLI commands.

Isn't there a simple 2-clicks or "run a script" solution out there?

I found some really good cloud platforms, but I'm not so sure about the usage-based billing. If you have experience why any, please share.

reddit.com
u/alexandonie — 2 days ago
▲ 0 r/rails

camaleon_cms 2.9.3 has been released

This is a big security release with several BREAKING changes, so upgrade ASAP!

https://github.com/owen2345/camaleon-cms/releases/tag/2.9.3

There also some minor performance fixes, agentic workflows and OpenSpec added.

Big lesson learned with LLMs - Claude is the only one deserving some trust! Fable and Opus 4.8 (Opus 5 is too young, it seems). And implementing something is only the half of the way - do a `/code-review max` with Fable 5 on the fresh PR and get its fixes implemented after this. Otherwise, without the code review follow-up, even Claude's implementation could be a borked one.

u/tvorogov — 1 day ago
▲ 15 r/rails

A Shadcn porting with ViewComponent & Stimulus

shadcn_view_component: same part names, same variants, same Tailwind classes, same data attributes. Radix's behaviour is reimplemented in Stimulus, it means no React and no complex dependency at runtime. Written with Claude support.

Any feedback are welcome (particularly from anyone who has run a screen reader) 😁

Dialog example

Sidebar example

reddit.com
u/sirion1987 — 3 days ago
▲ 60 r/rails+1 crossposts

Does Ruby/Rails still offer something unique for someone learning web development in 2026?

Does Ruby with Sinatra/Rails still offer something unique for someone learning web development in 2026?

I’ve been comparing different backend ecosystems recently, and Ruby with Sinatra/Rails keeps standing out to me for reasons that aren’t really about popularity or the job market.

I’m learning purely as a hobby, and I’m particularly interested in backend development: APIs, databases, authentication, testing, and eventually things like a small chat backend.

Something I’ve noticed is that people who have worked with several backend frameworks often speak very highly of what Rails teaches you about building web applications. conventions, REST, MVC, database-backed applications, and especially testing. RSpec and the testing culture around Ruby are also quite appealing to me, since I’d like testing to be part of how I learn development rather than something I bolt on later.

At the same time, Ruby doesn’t seem to come up nearly as often anymore when people discuss modern web development. The conversation is usually dominated by JS/TS, Python, Go, PHP/Laravel, etc.

So I’m less interested in “Should I learn Ruby?” and more curious about how experienced web developers view Ruby/Rails today:

**Does Ruby/Rails still have qualities that make it particularly good for learning how to build well-structured web applications, or have other ecosystems essentially caught up with what made Rails special?**

For comparison, I’ve also been looking at Elixir/Phoenix. Elixir especially interests me because it represents a very different approach to backend development.

I’d be interested in hearing from people who have used Rails *and* other modern backend stacks. What, if anything, do you think Rails teaches particularly well? And what parts of the Rails approach would you *not* want a new developer to internalize?

reddit.com
u/Intelligent_Role_824 — 6 days ago
▲ 14 r/rails

I rebuilt my FI spreadsheet as a Rails 8 app - here's the stack

Sharing my solo side project: welf, a net worth, investment and FIRE tracker.
You input your cash, shares, super, budget and debt, and welf historically snapshots your net worth each month and projects roughly when you could stop working.

Rails felt right for what is essentially a spreadsheet rebuilt as a web app - almost pure CRUD, with the interesting work in the domain model rather than the frontend.

The stack is boring but clean:

  • Rails 8.0 on Postgres
  • Hotwire (Turbo + Stimulus)
  • Solid Queue / Cache / Cable, running on local SQLite
  • Chart.js driven straight from Stimulus controllers
  • Kamal onto a single DigitalOcean box

Happy to answer questions on any of it, and if there are any FI-minded devs here, I'd really value the feedback

u/planfaster — 5 days ago
▲ 91 r/rails

Still on wicked_pdf? I wrote a :pdf renderer that needs neither wkhtmltopdf nor headless Chrome

I'm the author. If you have a Rails app still on wicked_pdf, you've probably had the same conversation I did after wkhtmltopdf was archived in 2023: keep shipping an unmaintained binary, or move to Grover and take on a Chrome process.

I wrote a third option. sghtmltopdf is a rendering engine in Rust with no browser inside it — the HTML and CSS parsers come from Servo's crates, and the layout and pagination are written for this project. The gem registers a :pdf renderer in the spirit of wicked_pdf, so an existing controller often needs no changes:

render pdf: "invoice",
  template: "invoices/show",
  layout: "pdf",
  page_size: "A4",
  margin_top: "20mm"

show_as_html: true works too, so you can still open the thing in a browser and poke at it with devtools. The converter keys are flat CLI flag names, so wicked_pdf's nested margin: {top: 10} becomes margin_top: "10mm" — the docs map every key one by one.

A few things that matter inside a Rails process specifically. It runs in-process via a native extension, so no subprocess and no temp files, and it releases the GVL while rendering so other Puma threads keep working. /assets/... URLs resolve as local files, with helpers that inline assets in development. And with ActionController::Live you can stream pages as their layout finalizes, which also makes Rack::Timeout effective at chunk boundaries.

If you'd rather not spend app CPU on rendering, or the gem can't run where your app runs, set server_url and the same calls get delegated to a separate server process.

JavaScript execution isn't in yet and CSS coverage isn't complete — both are things I want to grow, and JS is likely to come via an embedded engine rather than a browser. Pixel parity with Chrome isn't a goal, though. Right now it handles invoices, receipts and reports well; for arbitrary pages it isn't the tool.

Early 0.1 release, MIT, precompiled gem.

Migration notes from wicked_pdf: https://waka.github.io/sghtmltopdf/migration/wicked-pdf.html
Repo: https://github.com/waka/sghtmltopdf

Sample output:

https://preview.redd.it/nnc1nb326sih1.png?width=589&format=png&auto=webp&s=8f5e4a56fea161e7b1e069ef77c9f1261007aa62

reddit.com
u/yo_waka — 9 days ago
▲ 1 r/rails+1 crossposts

Help me with CFP for RubyConf India

I am a ROR developer for 3 years now, need to submit a good Ruby/Rails related talk.

I know I should decide my topic based on the work I do but need suggestions from community what topics talks are good and knowledgeable.

Do let me know if you know anything intresting around Ruby or Rails.

Thanks

reddit.com
u/ogpare — 6 days ago
▲ 20 r/rails

I deployed a stock Rails app with Kamal, and the "server" was a managed Kubernetes cluster

Hi,

I want to share something that I think might work for you. I work on Miget PaaS, where we added Kamal deploy as a deployment channel alongside GitHub, git push, and the container registry a while ago.

As a Rails developer and old sysadmin guy, I really like the way Kamal works. What I don't like is the sys part. Deploying to Hetzner or OVH is fine as long as the node isn't dead. So I was thinking: "How to make it possible to deploy it to a managed service?"

Normally, Kamal SSHes into a server and runs Docker commands over the Docker Engine API. We did something similar, but a bit different: we put a shim on the other end of that API. It speaks Docker to Kamal and creates Kubernetes objects underneath. So `kamal deploy` runs unchanged, with the same deploy.yml, and the "server" it deploys to is a managed cluster instead of a VPS.

Full walkthrough: https://miget.com/blog/deploy-rails-with-kamal

One note: This is not for everyone. If owning your servers is the point for you, Kamal on a VPS is great, and you do not need this. It is for the Rails dev who likes the Kamal workflow but not the sysadmin half. Happy to answer anything about how the shim works.

To mods: I wrote it by myself; no AI involved here. Only Grammarly to fix my English ;)

u/ktaraszk — 8 days ago
▲ 19 r/rails

I started a Discord for the French Ruby community, sharing it here in case it's useful to fellow frenchies !

France has a decent number of local Ruby meetups (Paris, Lyon, Toulouse, Nantes, Lille, Marseille all have active groups), but there wasn't really a place to hang out \*between\* meetups, no shared Discord, no central spot to ask a quick question or hear about what's happening in other cities.

I put together \*\*France.rb\*\* to fill that gap: help channels, a channel per city that relays local meetup events, and a freelance/jobs section since a good chunk of the French Ruby scene works independently. It's brand new (launched this week, still tiny), and it's mainly aimed at French speakers, so if you don't speak French it's probably not that useful to you day-to-day, but Rubyists from anywhere are welcome to drop in.

Not trying to compete with the official Ruby Discord linked on ruby-lang.org this is just something more specific to the French scene, meant to complement it.

https://discord.gg/FZ6dXEfq4

Happy to answer anything in the comments, and if you know a French-speaking Rubyist who might be into it, feel free to pass it along.

reddit.com
u/Kitchen_Friendship11 — 6 days ago
▲ 61 r/rails+1 crossposts

Full speaker list for the 2026 SF Ruby Conference is out!

19 confirmed speakers for the 2026 SF Ruby Startup Conference. The lineup includes founders of Ruby startups, scaleup employees, authors of open source, and engineers building and experimenting with Ruby.

You can find speakers from companies like Gusto, Anthropic, Shopify, Intercom (Fin), and Evil Martians, as well as the authors of Yabeda, AnyCable, Solid Queue, and Ruby LLM.

Hope to see you there. Full speaker list: sfruby.com

u/Individual_Dot7019 — 8 days ago
▲ 27 r/rails+1 crossposts

I'm writing this tiny parser and realized how easy it is to wire your own simple REPL.

Do not use use eval for the real thing if you aren't sure where the input is coming from, but its good enough to get started.

u/6stringfanatic — 9 days ago
▲ 36 r/rails

Solid Queue with PostgreSQL LISTEN/NOTIFY

I just released solid_queue-listen_notify.

Solid Queue’s default implementation constantly polls PostgreSQL for new jobs. This gem instead uses LISTEN/NOTIFY, a much more efficient pattern also used by GoodJob.

I’ve been running it in production for a couple of weeks, and it’s been working great for me!

u/cmer — 9 days ago
▲ 8 r/rails

Hotwire perf monitoring

huuummm quick question: I have a "kahoot" style app and at 100 users concurrently I have the user feedback that the "app stalls".

The nature of hotwire is fire-n-forget, I don't think upgrading to anycable would help here but i have no visibility to dissect the 100 people when it happens.

couple things i have in mind:
- the js front-end can bug
- rails backgrounds fails to execute
- another one?

I'm considering to use only polling for this feature (broadcast the answer to 100 people at the same time when survey item done)

Anyone has more info on this type of behavior? Blog? Opinions?

FYI: the stream is being properly loaded before the events starts.

reddit.com
u/letitcurl_555 — 9 days ago
▲ 31 r/rails+1 crossposts

RubyLLM::Schema Is Now Schematist: A JSON Schema DSL for Ruby with Full Draft 2020-12 Coverage

I maintain RubyLLM, and one of its dependencies has been quietly useful to people who have nothing to do with LLMs. It was always a clean, general purpose JSON Schema DSL. It was just called RubyLLM::Schema, so unless you already used RubyLLM you'd never find it.

It's now grown to fully cover the latest JSON Schema spec, Draft 2020-12, with no dependencies at all. Which earned it its own name: Schematist.

class Order < Schematist::Schema
  string :kind, enum: %w[personal business]

  given kind: "business" do
    object :tax_details do
      string :vat_number
    end
  end
end

Order.new.to_json_schema
# => { "$schema" => "https://json-schema.org/draft/2020-12/schema", "title" => "Order",
#      "type" => "object", "if" => {...}, "then" => {...}, ... }

Eight lines of Ruby, 47 lines of JSON Schema.

What 1.x brings:

  • It emits actual JSON Schema. to_json_schema used to return {name:, description:, schema:, strict:}, which is OpenAI's response_format wrapper with the real schema buried inside it. Now you get a Draft 2020-12 document with string keys that any validator will take.
  • Full Draft 2020-12 coverage. Composition, unevaluated properties and items, patternProperties, propertyNames, prefixItems and open ended tuples, contains, annotations, content encoding, the core $ keywords, and if/then/else branches that hold any schema rather than a fixed list of validations.
  • A schema doesn't have to be an object. A type with a name declares a property, without a name it declares what the schema itself is. So a root, or a define, can be an array, a union, or a bare $ref.
  • Zero runtime dependencies.
  • Values can be procs, resolved when the document is rendered, so one schema class produces a different document per instance. Useful when an enum comes out of the database.

Existing users: there's a final ruby_llm-schema release that depends on Schematist and aliases the old constants, so RubyLLM::Schema keeps resolving while you migrate. to_json_schema changing shape is the one thing to watch, and the README has the migration.

All of this is part of my concerted effort to make Ruby the best language to build with LLMs.

Write-up: https://paolino.me/schematist/

Repo: https://github.com/crmne/schematist

reddit.com
u/crmne — 9 days ago