Low commit activity in last 3 years
There's a lot of open issues
No release in over a year
Rails engine to manage front end builds and deployments
 Project Readme

Deprecation Notice

TED has shifted to React and will no longer maintain this application/library. If you wish to continue using this application/library, please create a pull request and repo ownership can be transferred. This repository will be archived at the end of 2022.

Build Status Code Climate Gem Version


Front-End Builds (FEB) lets you easily serve remotely-hosted static (JS) applications from your Rails apps. For example, you can host a Rails backend on Heroku, an Ember.js frontend on S3, and use FEB to connect the two.



  • Admin interface lets you easily view, rollback and activate different app versions

The motivation for this gem came from Luke Melia's RailsConf2014 talk.


Add this line to your application's Gemfile:

gem 'front_end_builds'

And then execute:

$ bundle

Front-End Builds brings some migrations along with it. To run, execute

rake front_end_builds:install:migrations
rake db:migrate


First, mount the admin interface in routes.rb:

Rails.application.routes.draw do

  mount FrontEndBuilds::Engine, at: '/frontends'


You should mount this under an authenticated route using your application's auth strategy, as anyone with access to the admin will be able to affect the production builds of your front end apps.a

If you don't want to set up an HTML auth strategy, you can do something like this:

# routes.rb
protected_app = Rack::Auth::Basic.new(FrontEndBuilds::Engine) do |username, password|
  username == 'admin' && password == (Rails.env.production? ? ENV['FEB_ADMIN_PASSWORD'] : '')
mount protected_app, at: '/frontends'

This will use basic HTTP auth to secure access to your admin ui. Just set the ENV variable in production, and use it to gain access. If you're deploying to Heroku, use Config Vars.

Now, to create a new app, first add a front_end route pointing to your app in routes.rb:

Rails.application.routes.draw do

  front_end 'app-name', '/app-route'


Visit the admin (at whatever URL you mounted the engine above), create a new app named app-name, and you'll receive instructions on how to start pushing builds.

Note: If you're using this engine to serve an ember app at the Root, be sure to put all other Rails routes above the front_end route - as this takes priority over all routes below it!

Rails.application.routes.draw do
  # All other Rails routes here

  front_end 'app-name', '/'

At this point you should be able to test the setup in dev by running

bin/rails server

Visit /frontends to access the Admin interface, and visit the front_end route, which will initially return 404 Not found since you haven't configured and deployed any front-end builds yet.

A note on SSH Keys

At this time only RSA keys are supported for authentication. You can't generate the keys using ssh-add you'll need the use something like this

Example Next Steps with Heroku and Ember.js

A common configuration is to deploy your FEB-enabled Rails app to Heroku, and deploy your Ember.js frontend to S3:

  1. Deploy your Rails app to Heroku
  2. Configure your frontend app with ember-cli-deploy-front-end-builds-pack
  3. Access your Rails app's FEB Admin interface, add an app, and configure a public SSH key that corresponds to the private key you plan on using to sign your Ember.js builds
  4. Deploy your frontend app. If all goes well, it should build the Ember app, push the static assets to S3, then POST to your Rails app. You'll see the build in the Admin interface, and should be able to access your frontend at the front_end route you specified.



The Admin interface is an Ember CLI app within feb. A distribution is kept within the gem, and must be updated whenever admin code is updated.

After changing the admin app, run

rake admin:build

to store a fresh distribution.

Running tests

# Rails tests

# Admin tests, from /admin dir
ember test

Build status

This gem is built on Travis-CI.


  • Create docs site
  • Auto live setting
  • make posts idempotent (i think they are), but dont insert a new row if it already exists.