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
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:
ENV.rootURL,not ENV.baseURL, in your config settingsENV.rootURLfor production environment should point to/repo-name, not to/Heroku/Rails:
heroku creategit push heroku masterheroku run rake db:migrateheroku run rake db:seedheroku config:set SECRET_KEY_BASE=$(rake secret)heroku config:set SECRET_TOKEN=$(rake secret)heroku config:set CLIENT_ORIGIN=https://yourgithubname.github.ioheroku apps:rename newname(optional)heroku restartheroku openGH pages/Ember:
config/environment.jsaccording to deployment guideENV.rootURL = '/quiltr';ENV.apiHost = 'https://quiltr.herokuapp.com';git checkout -b gh-pages/distfrom.gitignoreby adding a '#' before it. (do the same for~/.gitignore).gitignoreember build --environment=productiongit statusdist/) and commitgit subtree push --prefix dist origin gh-pages