Skip to content

Deploying Ember to GH Pages / Rails to Heroku: my notes #330

Description

@rhjones

Hi all,

I've shared these with a handful of people, but in case it helps anyone else—here's how I deployed Ember to GH pages & Rails to Heroku:

First, watch out for three issues w/the Ember deployment guide:

Heroku/Rails:

  • heroku create
  • git push heroku master
  • heroku run rake db:migrate
  • heroku run rake db:seed
  • heroku config:set SECRET_KEY_BASE=$(rake secret)
  • heroku config:set SECRET_TOKEN=$(rake secret)
  • heroku config:set CLIENT_ORIGIN=https://yourgithubname.github.io
  • heroku apps:rename newname (optional)
  • heroku restart
  • heroku open

GH pages/Ember:

  • update config/environment.js according to deployment guide
    • make sure the name of the root/base url variable matches across dev & prod environments
    • add rootURL to production
    • add apiHost to production
    • sample:
      • ENV.rootURL = '/quiltr';
      • ENV.apiHost = 'https://quiltr.herokuapp.com';
  • update application/adapter and ajax files according to deployment guide
  • git checkout -b gh-pages
  • Remove /dist from .gitignore by adding a '#' before it. (do the same for ~/.gitignore)
  • Add & commit .gitignore
  • ember build --environment=production
  • git status
  • add changed files (should be what's in dist/) and commit
  • git subtree push --prefix dist origin gh-pages

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions