This guide will help you install the optimal setup in order to have a productive time at the workshop. Guide is currently written for Mac OS X, but it easy enough to follow along for any modern Linux distribution as well.
- Operating system: Mac OS X or Ubuntu recommended. Microsoft Windows is not supported
- Command line: Terminal, iTerm, etc.
- Any Ruby version manager that supports
.ruby-version
file. Recommended: rbenv. Other options: chruby or rvm - Ruby 2.3.x
- Rails 5.x.x
- PostgreSQL 9.5.4 and above
- A working PostgreSQL client.
- Recommend:
psql
, comes bundled with PostgresSQL - Other options:
pgcli
, Postico
- Recommend:
- Git. Using a git repo to save your work is recommended, revisiting your Git history at a later date is quite valuable.
- Your everyday code editor / IDE, configured to be used with Ruby, and Rails. We highly recommend that you use your regular setup, in order to avoid any friction with editing.
- Check if you already have PostgreSQL installed.
- For a fresh installation, homebrew is recommended.
brew update && brew install postgresql
- Follow the instructions from
brew install
to initialise a PG database and start the service. If you're stuck with some error, and Googling around isn't helping, reach out to us. - At this point
psql
should start without errors. And you should be able to run a query like:
# select version();
version
----------------------------------------------------------------------------------------------------------------
PostgreSQL 9.5.6 on x86_64-apple-darwin16.4.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.42.1), 64-bit
(1 row)
Follow the installation instructions from the respective websites:
rbenv: https://github.com/rbenv/rbenv#installation chruby: https://github.com/postmodern/chruby#install rvm: https://rvm.io/rvm/install
rbenv install 2.4.1
gem install bundler
- Fork this Repo to your own Github account.
- Clone your repo, by following instructions from GitHub.
cd drc-pg-workshop
- Check Ruby version:
ruby -v
should show2.4.1
bundle install
rails db:setup
for creating databases and running migrations
./bin/rake
should work without errors, if it does, you're all set.