A website where makers can publish projects. An initiative by the University of Ottawa's Centre for Entrepreneurship and Engineering Design (CEED).
You'll need Ruby via rbenv, PostgreSQL, and NodeJS via NVM to run the website locally.
Then you'll need the master encryption key config/master.key and a database backup (referred to as msr-backup.bak here) to have a proper local installation.
Windows developers need to install WSL then follow the Linux-specific instructions below inside the WSL environment.
wsl --install -d Ubuntu # Or any distroNote: When cloning the repository make sure to not clone it within the /mnt directory, as this directory is shared with windows and may cause performance issues.
macOS developers need to install Homebrew if not already installed. Homebrew is a macOS package manager, similar to apt or pacman. It also manages services, used to start PostgreSQL. To start the database after installation, run brew services start postgresql
-
Install external dependencies and libraries. For macOS:
brew install postgresql@17 libpq imagemagick brew services start postgresql
For Linux:
sudo apt-get install postgresql libpq-dev imagemagick sudo systemctl enable postgresql --now -
Clone and install required ruby version
IMPORTANT: Make sure that you have all ruby-build requirements present, before starting Ruby compilation, or else you'll get an error after a long wait. Note that the requirements are different for each system.
# Install rbenv curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash # Clone repository using SSH if you're planning to make commits git clone ssh://git@github.com:uOttawa-Makerspace/MakerSpaceRepo.git cd ./Install # MakerSpaceRepo version in .ruby-version rbenv install # Install ruby dependencies bundler install # Install foreman gem install foreman
-
Install NVM, Node, then Yarn.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash nvm install 24 --lts nvm use 24 npm install -g yarn yarn install -
Make SAML certificates
mkdir certs openssl req -x509 -newkey rsa:4096 -keyout certs/saml.key -out certs/saml.crt -days 365 -nodes
-
Move the master credentials key into config
mv ~/Downloads/master.key config/master.key -
Start PostgreSQL and access a PostgreSQL shell. When inside nano, press
Ctrl-Wto start search.# Find the postgres config file and open in nano sudo nano $(sudo -u postgres -i psql -c 'SHOW config_file' | sed -n '3p') sudo systemctl restart postgresql psql -U postgres # or sudo -u postgres -i psql
Set the password for the
postgresuser topostgres. Then load a staging database backupALTER USER "postgres" WITH PASSWORD 'postgres'; CREATE DATABASE makerspacerepo; \c makerspacerepo \i ./path/to/msr-backup.bak exit
-
Setup development and test databases
rake db:setup RAILS_ENV=test rake db:setup
-
Run tests from the project root. If this doesn't immediately fail, you should have a functioning backend
rake
-
Start the server
foreman start -f Procfile.dev
Then visit http://localhost:3000 to view the home page locally.
NOTE: You'll receive a lot of AWS errors because you're accessing production images using development credentials.
Deployment is handled by Capistrano on Github Actions. Pushing to the staging branch deploys to staging server after tests pass. Pushing to the master branch deploys to the production server after tests pass.