Work-in-progress.
Adapted from https://github.com/codeforamerica/honolulu_answers/wiki/Installation-Instructions-for-OS-X-10.8-Mountain-Lion and personal experience.
- Make sure you have Ruby 1.9.3 installed. You can check this by running
ruby -v
in your terminal. rvm is a great tool for managing Ruby installations. - Obtain API keys for Searchify, BigHugeThesaurus, Amazon S3, and KissMetrics (optional).
- Fork the repo on GitHub
- Clone it
$ git clone [email protected]:YOUR-GH-USERNAME/answers.git
$ cd answers
- Create a
.env
file ($ cp .env.example .env
).
- There is a sample .env file in the root directory of the application called ".env.sample" (you can see it if you type ls -a).
- Fill in the blanks with your own API keys.
- Minimum keys needed are:
SECRET_TOKEN
: runrake secret
to generate one.
- Install qt dependency with Homebrew
- Install homebrew:
$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
- Install qt:
$ brew install qt
- Check you have at least 1.2.x of bundler with bundle -v. To upgrade, first remove bundler with gem uninstall -ax bundler and then reinstall with gem install bundler -v 1.2.1
- Install required gems:
$ bundle
- (
gem install bundler
if it's not already installed). You might have to open a new terminal tab after installing.)
$ rake db:prepare
$ rake db:setup
$ foreman run rails s
to start the server. Go to http://localhost:3000/articles.
Tests are located in the spec
folder.
$ rake spec
This codebase adheres to the git-flow model of branching.
- Develop using git-flow.
- Send a pull request when the feature is ready (typically, it shouldn't break any tests). Pull requests should be made against the
dev
branch. - Repeat.
See TBD deployment doc.