Reagent creation and barcoding service for DNA Pipeline.
- Ruby 2.7.2
- MySQL 8.0
- Chrome (for testing)
- The gems in the
gemfile
are separated into groups. When runningbundle install
, you will not need the gems in thedeployment
group for working locally. In order to ignore thedeployment
group on install, run:
bundle config set without 'deployment'
bundle install
-
Check the details in
database.yml
are correct for your local setup. By default the configuration expects a userroot
with nopassword
on the default MySQL port (3306). -
Initialise the test database:
RAILS_ENV=test rails db:create
RAILS_ENV=test rails db:schema:load
- Run the tests
bundle exec rspec
- Initialise the development database:
RAILS_ENV=development rails db:create
RAILS_ENV=development rails db:schema:load
- Add the seed data
RAILS_ENV=development rails db:seed
- Create a new team and add yourself as a user:
rails console
> team = Team.create(name: "Team Name")
> user = User.create(username: "YOUR_SANGER_USERNAME", team: team)
-
Run
rails server
and navigate to http://localhost:3000 -
Log in with your username and no password.
Mixtio in production uses the Sanger LDAP server to authenticate users. In development, this is stubbed out and any password for a valid user will successfully authenticate them.
To turn this feature off, set stub_ldap
to false
in development.rb
.
- Trouble with
libv8
andtherubyracer
? Check out https://stackoverflow.com/a/55645176
- Testing: RSpec Rails
- Pagination: Kaminari
- Creating test data: Factory Girl
- For testing web interactions: Capybara