Skip to main content

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/brew skip 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)"

Installing dependencies​

  • Please use iTerm2-rosetta on M1 Macs
  • Clone the project git clone [email protected]:powr/powr.git
  • Create a Brewfile.txt with 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 doctor and run the command it says you to run
  • Add these lines of code to the end of your ~/.bashrc or ~/.zshrc and 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-native
  • gem install ffi -- --enable-system-libffi
  • gem 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 12 and nvm use 12

DB​

  • Download database dump - the dump might be a bit outdated, so you'll need to run rails db:migrate after
  • Unzip the file
  • createdb powr_development
  • psql -d powr_development -f powr.dump

Development config files​

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