TopoDB requires Ruby version >= 2.5.2, Ruby on Rails version >= 5.2.0, and bundler version 2.0 . We recommend using rbenv to install and manage Ruby gems.
TopoDB is configured to use MySQL as the database component. Download and install MySQL prior to installing TopoDB on your system here.
Open the mysql shell and create a user and password for TopoDB to use to connect:
mysql> CREATE USER 'topo'@'localhost' IDENTIFIED BY 'password';
Create a database named topo_dev:
mysql> CREATE DATABASE 'topo_database';
Give the TopoDB user account all permissions on that database:
mysql> GRANT ALL PRIVILEGES ON topo_database.* TO 'topo'@'localhost';
Close the mysql shell
git clone --branch distribution https://github.com/UCSF-MS-DCC/TopoDB;
bundle install
rails db:migrate
rails db:seed
rails s
in the address bar of a web browser enter http://localhost:3000 to access TopoDB
Log in as the admin user that was created as part of the sample data set: email: [email protected], password: admin123 . Once logged in as the administrator it is strongly recommended that you create new users to handle day-to-day activities in the application and that you change the Administrator account password (failure to do so can put your data at risk). Both of these activities can be done either directly in the users database table, or through the included rails admin feature, available in the main navigation bar.
TopoDB has three pre-defined types of account permissions: Admin, editor, and normal. Normal users have read-only access to mouse, cage, and experiment data and may not enter, delete, or update data. Editors may read as well as enter, update, or delete mice, cage, and experiment data. Admins have all of the privileges of editors and may also access the rails admin interface to create or remove users as well as change users' permissions.
To add or remove a user's permissions, first access the Administration panel from the main navbar:
Next, select Users in the menu on the left:
Click the pencil icon on the row of the user to be edited:
To add or remove admin or editor permissions, check or uncheck the appropriate box: