Skip to content

Latest commit

 

History

History
127 lines (86 loc) · 2.87 KB

README.md

File metadata and controls

127 lines (86 loc) · 2.87 KB

IRIDA Next

Requirements

Setup

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

Postgres Setup

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

Serve

bin/dev

Navigate in your browser to http://localhost:3000

Test

bin/rails test:all

Running tests headful

HEADLESS=false bin/rails test:system

View Coverage:

Open coverage/index.html

Documentation

See docs.