This project is built on ruby version 2.2.2 (check with ruby -v
) and rails version 4.2.4 (check with rails -v
). Check out coderwall.com/p/4imsra/upgrading-ruby-to-2-1-0-and-above-in-mavericks for help getting ruby, rails, and rvm, just change the versions to the ones listed here.
There are two ways of viewing the project, the first is to visit the site at sangria.herokuapp.com/ which may be an older version of the code, and the second is to download the latest version and run locally with the instructions below (the instructions were written for Mac, as no one on the team runs Windows or Linux).
-
Clone the repo with
git clone https://github.com/juliacochran/sangria
-
Open the sangria directory with
cd sangria
-
Run
ruby -v
and ensure it’s 2.2.2-
If your ruby version is wrong, run
rvm --default use 2.2.2
-
If you get
-bash: rvm: command not found
, you may need to source into rvm withsource ~/.rvm/scripts/rvm
-
-
Run
rails -v
and ensure it’s 4.2.4-
If you get something like
Your Ruby version is x.x.x, but your Gemfile specified 2.2.2
, you may need to source into rvm withsource ~/.rvm/scripts/rvm
-
If your rails version is wrong, run
gem install rails -v 4.2.4
-
-
Run
rvm get stable
and thenrvm osx-ssl-certs update all
-
Run
bundle install
to update any libraries used, if bundle is not found, rungem install bundle
to get it -
Download Postgres App (postgresapp.com/). Move it to
/Applications
and run it. Hit “Open psql”. -
Run
rake db:migrate
-
Run
rails s
to start a local server, then open your browser and go tolocalhost:3000