Installing POWR project
Configuring iTerm2 rosetta (only for M1 Macs)​
- Go to Application folder
- Duplicate iTerm2
- Rename iTerm2 copy to iTerm2-rosetta
- Right click on iTerm2-rosetta
- Click ‘Get Info’
- Check ‘Open using Rosetta’
- Open iTerm2-rosetta
Homebrew (only for M1 Macs)​
which homebrew- If output is:
/usr/local/bin/brewskip Homebrew installation - If output starts with:
/opt/- Uninstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" - Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Uninstall Homebrew:
Installing dependencies​
- Please use
iTerm2-rosettaon M1 Macs - Clone the project
git clone [email protected]:powr/powr.git - Create a
Brewfile.txtwith following content
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
tap "mongodb/brew"
tap "shopify/shopify"
brew "libssh2"
brew "openldap"
brew "curl"
brew "freetds"
brew "glib"
brew "shared-mime-info"
brew "pkg-config"
brew "imagemagick@6"
brew "libpq"
brew "nghttp2"
brew "postgresql", restart_service: true
brew "ruby-build"
brew "rbenv"
brew "redis", restart_service: true
brew "ruby"
brew "mongodb/brew/mongodb-community"
brew bundle --file Brewfile.txt- If some error occurs, run
brew doctorand run the command it says you to run - Add these lines of code to the end of your
~/.bashrcor~/.zshrcand save it:export PATH="$HOME/.rbenv/bin:$PATH"; eval "$(rbenv init -)"and restart your terminal gem install sassc -v '2.2.1' -- --disable-march-tune-nativegem install ffi -- --enable-system-libffigem install thin -v '1.7.2' -- --with-cflags="-Wno-error=implicit-function-declaration"gem install foreman- Open folder with the project
cd powr bundle install. Some errors might occur during, try to fix them by googling
NVM​
- Install nvm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash - Install node 12:
nvm install node 12andnvm use 12
DB​
- Download database dump - the dump might be a bit outdated, so you'll need to run
rails db:migrateafter - Unzip the file
createdb powr_developmentpsql -d powr_development -f powr.dump
Development config files​
- Download application.yml and put it to
config/folder - Download optimization.js and put it to
config/webpack/folder
Launching the project​
foreman start -f Procfile.dev- open https://localhost:3002, ignore the warning and proceed
- open https://localhost:3000, ignore the warning and then you should see powr homepage