- asdf
- asdf-node
- asdf-pnpm
- asdf-ruby
- Note:
asdf-ruby
uses ruby-build and you will need to ensure you have the os level dependencies installed, which are documented here.
- Note:
- asdf-postgres
- Note:
asdf-postgres
requires that you have the os level dependencies installed, which are documented here
- Note:
Install requirements:
asdf install
Verify requirements:
$ which node
/home/USERNAME/.asdf/shims/node
$ which pnpm
/home/USERNAME/.asdf/shims/pnpm
$ which ruby
/home/USERNAME/.asdf/shims/ruby
$ which postgres
/home/USERNAME/.asdf/shims/postgres
Ensure bundler installed:
gem install bundler
Install dependencies:
bundle && pnpm install
Note: If an error is encountered building the pg
gem you will need to run this command. The version can be located in the .tool-versions file.
asdf shell postgres VERSION
After running this command to set the postgres version for the shell, you will need to re-run this command:
bundle && pnpm install
Generate credentials:
EDITOR=nano bin/rails credentials:edit
Initialize the database:
bin/rails db:create db:migrate db:seed
Start:
/home/USERNAME/.asdf/installs/postgres/14.6/bin/pg_ctl -D /home/USERNAME/.asdf/installs/postgres/14.6/data -l logfile start
Create a new role(user) and set the password
createuser -s test -P -U postgres
When prompted for a password for the test
role above, set the password as test
. These are the credentials used by the development and test databases.
Note: If using the asdf method to install and run postgres, you will need to restart the postgres server anytime the machine is rebooted.
If you would like a more permanent postgres setup on Ubuntu which the system can handle rebooting for you, you can follow these instructions, then enable and start the service using the commands below.
Enable postgresql service:
sudo systemctl enable postgresql.service
Start postgresql service:
sudo systemctl start postgresql.service
Install OpenSearch. For Homebrew, use:
brew install opensearch
brew services start opensearch
bin/dev
Navigate in your browser to http://localhost:3000
bin/rails test:all
HEADLESS=false bin/rails test:system
View Coverage:
Open coverage/index.html
See docs.