These instructions were tested on Ubuntu 21.10.
- Set up a Ruby version manager, such as Rbenv, and install the version of Ruby specified in
.ruby-version
. - Install
libpq
:sudo apt install libpq-dev
- Inside the application root directory, install gems:
bundle install
- Install PostgreSQL (note that the version may not match the production version):
sudo apt install postgresql
- Start PostgreSQL:
sudo service postgresql start
- Start a PostgreSQL console:
sudo -upostgres psql
- Create the
guesstimate-api
user:create user "guesstimate-api" with password 'password';
- Allow the user to create databases:
alter user "guesstimate-api" createdb;
- Create the
- Create the necessary databases and run migrations:
bundle exec rails db:setup
To see if things are working, try running the tests: bundle exec rspec