In these steps you'll download Typo, get it running on your local system, verify that its test suite passes, and do a test deployment to Heroku.
- Install Typo locally (see "Typo + GitHub Setup Instructions" below)
- Get the Typo test suite and make sure all specs pass green. Pending specs are fine. Run the following commands:
$ bundle exec rake cucumber
$ bundle exec rake spec
- Make sure Typo can be deployed to Heroku (see "deploying to heroku" instructions below).
- Fork the Typo repository: https://github.com/saasbook/typo (Typo is open source, but we have snapshotted the repo including fixing some failing tests and using a stable revision for Ruby 1.9.3 - note that so far in the course we have been on Ruby 2.2.2 - if you don't have Ruby 1.9.3 install it via
rvm install 1.9.3
) - Now clone your forked Typo repository into a folder on your local machine.
- Run
sudo apt-get update
- Run
sudo apt-get install libxml2-dev libxslt-dev
- Run
sudo chmod o+t -R /tmp
- Run
bundle install --without production
in the Typo directory. - Run the database migration in the Typo directory (
rake db:migrate
).
Typo wasn’t built with Heroku in mind, but the changes needed to deploy to Heroku have already been made in our fork of the Typo repository. If you haven't done it previously you will need to run the following at the command line:
$ heroku login
$ ssh-keygen
$ heroku keys:add
Then from within your copy of the Typo repository, run:
$ heroku create
$ git push heroku master
$ heroku run rake db:migrate
$ heroku open # doesn't work on C9 --> on C9 right click on link that git push to heroku generates
At this point a browser should open and take you to typo setup. Follow the onscreen instructions but please make a careful note of the password it generates for you. Once you leave the page with the password on you can't reset it unless you want to work out how to get typo set up to send email on Heroku. Note that you'll need this password for your homework submission.
Next: Fixing a Bug in Typo