Skip to content

Dev: Setup on Windows

Mat Schaffer edited this page Aug 10, 2018 · 13 revisions

Just notes for now. Working on getting this set up still.

Requiremtents

Postgres/Postgis

Install Postgres/Postgis from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads, 9.3 should do the trick.

Once that's done you need to add the bin directory to your system path (see https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ for some info on how to edit it). The path you want to add will be something like C:\Program Files\PostgreSQL\9.3\bin

Ruby

Install ruby https://rubyinstaller.org/downloads/ make sure the version is at least the same minor (e.g., 2.2.X) version as what https://github.com/Safecast/safecastapi/blob/master/.ruby-version specifies.

NodeJS

Install https://nodejs.org/en/download/ - rails needs this to compile some javascript code

Final check

Once you have the pieces, open a terminal and ensure you can run basic commands.

psql --version
ruby --version
node --version

Configuration

DB

Then you'll need to create a database user. You should have a tool called pgAdmin available in your start menu. Use that to add a safecast role and specify it as a superuser.

Gemfile

You may need some gemfile tweaks (to be added)

Then try running bundle this should set up the gems

Db setup

bundle exec rake db:create
bundle exec rake db:structure:load
bundle exec rake db:structure:load RAILS_ENV=test

Running tests

bundle exec rspec spec

Running server

bundle exec rails server
Clone this wiki locally