This README documents the steps necessary to get this application up and running.
$ Rails 4.0.0 $ Ruby 2.1.1 $ PostgreSQL 9.3
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
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
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"
Inside the project directory, run the following command:
$ > bundle
Create the application and test databases:
$ rake db:create:all $ rake db:migrate $ rake db:test:prepare
To run the unit tests:
$ > rspec spec/models
To run the acceptance tests:
$ > rspec spec/features