A website where makers can publish projects. An initiative by the University of Ottawa's Centre for Entrepreneurship and Engineering Design (CEED).
-
Open Powershell & Install WSL for Ubuntu
wsl --install -d Ubuntu
-
Follow the Debian-based Linux Distributions setup instructions using WSL.
- Note: When cloning the repository in step 6, make sure to not clone it within the
/mnt
directory as this directory is shared with windows and may cause performance issues.
-
Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install PostgreSQL and libpq-dev with homebrew:
brew install postgresql@14 libpq
-
Start PostgreSQL & Access a PostgreSQL Shell
brew services start postgresql@14 psql -U postgres
-
Run the following commands in a PostgreSQL shell to allow MakerRepo to connect:
ALTER USER "postgres" WITH PASSWORD 'postgres'; CREATE DATABASE makerspacerepo; exit
-
Install rbenv and Ruby 3.1.2
brew install rbenv rbenv install 3.1.2
-
Install NVM and Node 18 LTS
# Check to see if '.zshrc' is present in home directory cd ~ ls -a # If '.zshrc' is not present, create .zshrc profile in home directory touch .zshrc # Install NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash source .zshrc # Install Node 18 LTS nvm install 18 --lts
-
Clone this repository and go into it:
git clone https://github.com/uOttawa-Makerspace/MakerSpaceRepo.git cd MakerSpaceRepo
-
Install gems:
bundle install
-
Create X.509 certificates for SAML:
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 (Ask for master.key file)
mv ~/Downloads/master.key config/master.key
- Configure Postgres for port 5433, ctrl+w to search for port, replace 5432 with 5433.
# Locate configuration file
psql -U postgres -c 'SHOW config_file'
# edit configuration file and change port variable
nano <your configuration file location>
- Set up the database:
rake db:setup
rake db:setup RAILS_ENV=test
- Run all tests to load clean fixtures into the database (You will fail one test because you do not have wkhtmltopdf, you may optionally install it if it is compatible with your distro.):
bundle exec rake
- Install yarn and yarn packages
npm install -g yarn
yarn install
- Start the Rails server:
foreman start -f Procfile.dev
-
Install PostgreSQL and libpq-dev if they are not already installed:
sudo apt-get install postgresql libpq-dev git curl
-
Access a PostgreSQL Shell:
sudo -i -u postgres psql
-
Run the following commands in a PostgreSQL shell to allow MakerRepo to connect:
ALTER USER "postgres" WITH PASSWORD 'postgres'; CREATE DATABASE makerspacerepo; exit
-
Install rbenv and Ruby 3.1.2:
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc rbenv install 3.1.2
-
Install NVM and Node 18 LTS:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" nvm install 18 --lts
-
Clone this repository and go into it:
- Note: For WSL users, make sure the repository isn't cloned within the
/mnt
directorygit clone https://github.com/uOttawa-Makerspace/MakerSpaceRepo.git cd MakerSpaceRepo
-
Install gems:
bundle install
-
Create X.509 certificates for SAML:
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 (Ask for master.key file)
mv ~/Downloads/master.key config/master.key
-
Configure Postgres for port 5433, ctrl+w to search for port, replace 5432 with 5433.
sudo nano $(sudo -u postgres psql -c 'SHOW config_file' | sed -n '3p')
sudo systemctl restart postgresql
- Set up the database:
rake db:setup
rake db:setup RAILS_ENV=test
- Run all tests to load clean fixtures into the database (You will fail one test because you do not have wkhtmltopdf, you may optionally install it if it is compatible with your distro.):
bundle exec rake
- Install yarn and yarn packages
npm install -g yarn
yarn install
- Start the Rails server:
foreman start -f Procfile.dev
Note: You will want to change the remote origin from https to an ssh source, [email protected]:uOttawa-Makerspace/MakerSpaceRepo.git, in order to push.
Happy coding!