Initial-setup
+++ MacOS Silicon M1 chip
(We are assuming tha you use zsh)
Uninstall Rosetta Homebrew
Run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
!!!
This is needed only if homebrew is already there at /usr/local/bin/brew
!!!
Install native Homebrew (/opt/homebrew/bin/brew)
Run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
zsh:
Visit this link
Install Ruby
Clone the backend repo with
git clone [email protected]:uala/uala-backend.git
Run:
brew install rbenv
RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install $(cat /PATH_TO_UALA_BACKEND_LOCAL_REPO/.ruby-version)
gem install nokogiri -v 1.11.2 -- --use-system-libraries
Alternative for ASDF:
brew install asdf
RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC asdf install ruby $(cat /PATH_TO_UALA_BACKEND_LOCAL_REPO/.ruby-version)
# Add to your ~/.zshrc: export GEM_HOME=$HOME/.gem
Install Uala backend required packages
Run:
brew install redis
brew install postgresql@10
brew install shared-mime-info
brew install librdkafka
brew install imagemagick@6
brew install nodejs
brew install libsodium
brew install pkg-config
brew install cmake
Add to your shell configuration:
export PATH="/opt/homebrew/opt/postgresql@10/bin:/opt/homebrew/opt/imagemagick@6/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/imagemagick@6/lib/pkgconfig:$PKG_CONFIG_PATH"
Run:
brew link imagemagick@6 --force
+++ Ubuntu
Clone the backend repo with
git clone [email protected]:uala/uala-backend.git
Install asdf and asdf-ruby plugin
Install ruby-build dependencies
Install Ruby:
asdf install ruby $(cat /PATH_TO_UALA_BACKEND_LOCAL_REPO/.ruby-version)
Install gems dependencies:
# For `redis`
sudo apt install redis
# For `rmagick` gem
sudo apt install imagemagick libmagickwand-dev
# For `rugger` gem
sudo apt install cmake
bundle install
+++ Windows
Install WSL2 following the official documentation
Proceed as per Ubuntu instructions
+++