RubyFlow The Ruby and Rails community linklog

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

  Today

Omakase 0.2 — agents as plain Ruby objects

I released Omakase 0.2, a small agent framework on top of RubyLLM about 800 lines. The idea is that an agent is an ordinary Ruby object: its fields are state, its public methods are what the model can call (no tool registry, no JSON schemas to keep in sync - describe above a method is the description the model reads), and the methods you declare without a body are written by the model at runtime. The return type is the contract: a schema block gives you validated data, a scalar unwraps to a value, and a Ruby class means the method hands back the object your code built - under the default :code_act strategy the model answers by writing Ruby that is evaluated on the agent itself and calling finish(value), so the answer is computed rather than retyped as JSON. There’s also :predict for one-shot structured output, MCP servers and SKILL.md directories that arrive as methods, per-method model selection, attachments, and a FakeChat so agents can be tested without a network. The transcripts in the README are from a 30B model on OpenRouter rather than a frontier one, on the theory that a strategy which only works on the biggest model available is a demo and not a library. The docs cover the Rails side - agents in app/agents, jobs, multi-turn built from your own tables - and are blunt about the fact that generated code runs with instance_eval, so untrusted input belongs to :predict unless you swap in your own executor. MIT, Ruby 3.2+. [more inside]

Updates to Testing Rails from Scratch book

Hi, I’ve pushed some updates to my work-in-progress book on using Rails defaults (mostly) for test-driven development, based on my approach and opinions from using RSpec for 15 years. The updates are now available on Leanpub, and I wrote a quick post on Left of the Dev to share what’s available now and what’s next. Thank you for your support! [more inside]

XO Ruby joins RubyConf as Another Exclusive Discriminatory Unexcellent Conference

So, I got contacted by the organizer of the XO Ruby conference (aka Travelling Ruby), Pascal Laliberté, on meetup.com because I organize the Montreal.rb Ruby Meetup and am a Montreal-based Expert Ruby Software Engineer. He said XO Ruby is coming to Montreal and asked me for help with it. We end up meeting in a video conference call…

sghtmltopdf: an HTML to PDF renderer in Rust, with a Ruby gem and Rails integration

wkhtmltopdf was archived in 2023, leaving Rails apps stuck between an unmaintained binary and spawning headless Chrome. I built sghtmltopdf, a new rendering engine written in Rust that implements CSS Fragmentation and @page directly, so page breaks, orphans and widows are first-class rather than approximated. It ships as a CLI, an HTTP server, and a Ruby gem (gem "sghtmltopdf"). [more inside]

Turbo Drive, Frames and Streams: a reference verified against the source

Turbo’s documentation is complete but unconnected: Drive, Frames and Streams sit side by side with nothing saying what links them or how to choose. This is the reference I wanted when I started, written by reading the source of Turbo 8.0.23 and turbo-rails 2.0.23 rather than the docs, because that is where the gaps are. [more inside]

Running a Ruby MCP Server in Production

In this article, Amanda goes through what a Ruby MCP server needs once it stops being a subprocess: Streamable HTTP instead of stdio, a choice between a standalone service and an endpoint inside an existing Rails app, statelessness so it survives more than one Puma worker, Host and Origin validation that a security advisory made mandatory, a shared token as the internal floor with OAuth as the answer beyond it, and read-only models and server_context deciding what any caller can actually reach. [more inside]

Wide Events: Token-efficient Rails telemetry for coding agents

I released Wide Events, a Rails gem that records each request or job execution as one dense, high-cardinality telemetry event. It gives coding agents queryable production context without making them reconstruct what happened from scattered logs, spans, and metrics. Agents can retrieve only the relevant rows and fields for a route, account, build SHA, feature flag, or error, keeping the context compact. [more inside]

I wrote up the production problem behind Wide Events, a Rails gem that adds app…
Loading older posts