Breakfast is a Ruby gem that integrates the Brunch.io build tool into Rails applications, giving developers ES6 module support, live reload for CSS, JS, and HTML, and a Yarn-managed frontend workflow.
What is Breakfast?
Breakfast is a Ruby gem, not a standalone template, that connects the Brunch.io build tool to the Rails asset pipeline. It takes modern JavaScript source files (ES6 modules, CSS, HTML) and produces compiled assets that Rails serves, running inside your existing Rails app. The gem is maintained by devlocker and released under the MIT License, with version 0.6.6 as the latest patch.
Key Features
- ES6 syntax & modules — Write modern JavaScript with import/export syntax; Breakfast compiles it through Brunch without a separate build step.
- Live reload — The gem automatically reloads CSS, JS, and HTML changes in the browser during development, removing manual refresh cycles.
- Yarn support — JavaScript packages are managed with Yarn, integrating into Rails' asset pipeline.
- Rails 5/6 compatibility — Works with Rails 5.0 and greater; patch 0.6.6 removed the ActionCable constraint to support Rails 6.
- Simplified Heroku deploys — Since 0.6.0 no custom Heroku buildpack is needed; just set the nodejs buildpack first and ruby second.
- Capistrano integration — No custom rake tasks; asset precompilation relies on the standard Capistrano Rails gem, with Yarn installed on deployment hosts.
- Quick setup — The project documentation claims you can be running the latest frontend framework in minutes.
- MIT licensed — Free to use, modify, and distribute.
Who is it for?
- Rails developers who want modern JavaScript tooling without running a separate Node.js build server.
- Teams deploying to Heroku that need a simple two-buildpack setup for their Rails and JavaScript assets.
- Brunch users who prefer keeping their build tool inside the Rails asset pipeline rather than as an external process.
What can you do with Breakfast?
- Rails developers: Add ES6 support and live reload to a Rails 5/6 app in minutes, then deploy with no custom buildpack.
- Capistrano users: Run asset precompilation through the standard Capistrano Rails gem, with Yarn required on deployment hosts.
- Frontend teams: Manage JavaScript dependencies with Yarn and compile them through Brunch within the Rails asset pipeline.
How does Breakfast work?
Breakfast hooks into the Rails asset pipeline via Brunch. You install the gem and the corresponding JavaScript package, and it watches your source files, compiling them on demand. For production, the standard assets:precompile task now includes the behavior that previously required separate Capistrano rake tasks.
Pricing
Breakfast is open source under the MIT License, meaning it is free to use for any purpose.
FAQ
Does Breakfast work with Rails 6?
Yes, as of version 0.6.6, the gem removed a constraint on ActionCable, enabling support for Rails 6. Earlier versions required Rails 5.0 or later.
Is Breakfast free?
Yes, Breakfast is released under the MIT License, which permits free use, modification, and redistribution, including in commercial projects.
Do I need a custom Heroku buildpack?
No. Starting with version 0.6.0, the custom Heroku buildpack was removed. You only need to configure the nodejs buildpack first and the ruby buildpack second.
How do I upgrade from 0.5.x to 0.6.0?
Run bundle update breakfast, upgrade the breakfast-rails package with Yarn, and if deploying with Capistrano remove the require "breakfast/capistrano" line from your Capfile and any custom Breakfast settings. Then ensure Capistrano Rails is used.
What does Breakfast integrate?
Breakfast integrates Brunch.io with the Rails asset pipeline, and it uses Yarn for managing JavaScript packages. This combination provides ES6 compilation, live reload, and a straightforward build process.








