Coming Soon · Spring 2025

Building LLM Applications with Ruby on Rails

Integrate OpenAI, Claude, and other providers using the Rails patterns you already know and love. Just Rails, just Ruby.

Join my newsletter for book updates, tutorials, and insights on building AI features with Rails. No fluff, just what's working in production.

Presale discount for newsletter subscribers

No spam. Unsubscribe anytime.

What you'll learn

Practical AI for production Rails applications

This book covers the patterns, architecture decisions, and implementation details you need to integrate AI capabilities into real Rails applications.

LLM Integration Patterns

Connect to OpenAI, Anthropic, and other providers with clean, maintainable service objects that handle retries, timeouts, and error states.

Prompt Engineering for Rails

Structure prompts effectively, manage prompt versions, and build reusable prompt templates that your team can maintain.

Background Processing

Handle long-running AI operations with Active Job, manage token limits, and implement proper job retry strategies.

Streaming Responses

Implement real-time streaming with Turbo Streams and Action Cable for responsive AI-powered features.

Testing AI Features

Write deterministic tests for non-deterministic systems. Mock strategies, fixture patterns, and integration testing approaches.

Cost Management

Track token usage, implement rate limiting, and build dashboards to monitor AI spending across your application.

The transformation

From uncertain to confident

Before this book

  • You feel left behind as every product adds AI features
  • You're unsure how LLMs fit into Rails architecture
  • You can't evaluate trade-offs between different LLM providers
  • AI feels like a black box that doesn't follow Rails conventions

After this book

  • You evaluate LLM capabilities with confidence
  • You architect AI features that scale with your Rails app
  • You know exactly when to use embeddings, streaming, or background jobs
  • You ship AI features using patterns your team already understands

Why this book

Built for engineers who ship real software

Most AI content focuses on demos and hype. This book is different. It's written for experienced Rails developers who need to integrate AI capabilities into production applications, not experiment with toys or rebuild everything in Python.

This is the playbook for integrating LLM features into Rails applications. You'll learn proven patterns for prompt engineering, cost management, testing, and deployment, all demonstrated with working Rails code you can run locally. No theory. No toy examples. Just production-ready patterns you can ship today.

Every pattern in this book is battle-tested in production applications, built on Rails conventions your team already knows, and designed to be maintained long after you ship. This isn't just another AI tutorial. It's the Rails-native guide to shipping LLM features that scale.

How you'll learn

Code-first, git-tagged learning

Every chapter maps to a git tag in a working Rails application. Check out working code at any stage, run it locally, and see exactly how each concept builds on the last.

You'll build a complete AI-powered support ticket system from scratch, commit by commit. No broken examples. No "left as an exercise." Just working code you can learn from.

terminal

$ git tag

chapter-01-setup

chapter-04-first-llm-feature

chapter-08-rag-pipeline

chapter-12-production-deploy

$ git checkout chapter-04

✓ Working Rails app ready to run

About the author

Damian Galarza

I've been building production Rails applications for over 15 years. As CTO at Buoy Software, I grew the engineering team from zero to 50+ and shipped FDA-cleared medical device software.

I run a YouTube channel focused on AI engineering with Rails, where I share practical implementations and architectural decisions from real projects.

Currently, I'm a Senior Software Engineer at August Health, where I build software that helps senior living operators deliver better care and operations. I advise founders and teams on architecture, AI integration, and engineering execution.

FAQ

Frequently asked questions

Is this book for beginners?

No. This book assumes you're comfortable with Rails, REST APIs, and production deployments. If you've shipped Rails apps professionally, you're ready for this book.

Do I need a machine learning background?

Absolutely not. The book explains LLM concepts from a software engineering perspective. You'll learn how to integrate and control LLMs, not how to build them.

When will the book be released?

Expected Spring 2025. Newsletter subscribers get early access and exclusive launch pricing.

What format will it be available in?

DRM-free PDF, ePub, and Mobi. Code examples will be available on GitHub with git tags for each chapter.

Will there be updates?

Yes. The first edition will be actively maintained through 2025 as the LLM landscape evolves. All updates included with purchase.

Can I buy it for my team?

Yes. Team licenses and bulk discounts will be available. Email me directly for pricing.

Be the first to know when it launches

Expected Spring 2025

$47 $37 Save $10

Presale price for newsletter subscribers

Join my newsletter for book updates, tutorials, and insights on building AI features with Rails. No fluff, just what's working in production.

No spam. Unsubscribe anytime.