Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.38 KB

DEV-SETUP.md

File metadata and controls

53 lines (37 loc) · 2.38 KB

Development Instructions

Work-in-progress.

Adapted from https://github.com/codeforamerica/honolulu_answers/wiki/Installation-Instructions-for-OS-X-10.8-Mountain-Lion and personal experience.

Installation

  1. 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.
  2. Obtain API keys for Searchify, BigHugeThesaurus, Amazon S3, and KissMetrics (optional).
  3. Fork the repo on GitHub
  4. Clone it $ git clone git@github.com:YOUR-GH-USERNAME/answers.git
  5. $ cd answers
  6. 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: run rake secret to generate one.
  1. Install qt dependency with Homebrew
  • Install homebrew: $ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
  • Install qt: $ brew install qt
  1. 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
  2. Install required gems: $ bundle
  • (gem install bundler if it's not already installed). You might have to open a new terminal tab after installing.)
  1. $ rake db:prepare
  2. $ rake db:setup
  3. $ foreman run rails s to start the server. Go to http://localhost:3000/articles.

Testing

Tests are located in the spec folder.

  1. $ rake spec

Development

This codebase adheres to the git-flow model of branching.

  1. Develop using git-flow.
  2. 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.
  3. Repeat.

Deployment

See TBD deployment doc.

Gotchas