Skip to content

Latest commit

 

History

History
62 lines (36 loc) · 1.35 KB

README.rdoc

File metadata and controls

62 lines (36 loc) · 1.35 KB

README

This README documents the steps necessary to get this application up and running.

System dependencies

$ Rails 4.0.0
$ Ruby 2.1.1
$ PostgreSQL 9.3

Setting Up Postgres

Installation

It’s better to install Postgres through Homebrew to get the latest version and the development files. This command will download and compile Postgres:

$ > brew install postgresql

Finish creating the database:

$ > initdb /usr/local/var/postgres

Start Postgres

From the terminal, run:

$ > pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

Verify that you are running the correct instance:

$ > psql --version
$ psql (PostgreSQL) 9.1.3
$ > which psql
$ /usr/local/bin/psql

Local Variables

In the development and test environments, it’s more convenient to have the database username be the same user in the local system. Create an application.yml file under /config and add your ENV variable(s). Mine looks like this:

$ LOCAL_PG_USER: "carlisia"

Bundle the application

Inside the project directory, run the following command:

$ > bundle

Database

Create the application and test databases:

$ rake db:create:all
$ rake db:migrate
$ rake db:test:prepare

Running the Tests

To run the unit tests:

$ > rspec spec/models

To run the acceptance tests:

$ > rspec spec/features