Mac project setup
Other doc (older) for setting up project: https://www.getoutline.com/doc/home-03bCN4jzxG For your additional trouble look at there: https://www.getoutline.com/doc/traps-and-tricks-on-installing-powr-repo-hKLTqisJRf
$: - console command
Git installation:
$: git --version
Since git is not installed, mac will ask to install git, click "install"
Homebrew installation:
it is recommended to instal Homebrew on mac, it helps installing and managing apps on macOS.
$: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$: brew update
check that brew (Homebrew) is up to date.
IDE/Editor:
Choose whatever you like, here are some options used by POWr rangers: Visual Code - fast enough, has good extensions RubyMine - fully integrated IDE, has everything out of the box, fast, but it is paid, if you have student email, you can get it for free for 1 year (with possibility to renew) Atom - quite slow, but very flexible
PostgreSQL installation:
Easiest way is to install via gui app: https://postgresapp.com/, follow instructions from its docs. Optionally you can install pgAdmin 4 client, for gui access to databases. You don't need it if you have RubyMine Ide.
Ruby installation:
Install rbenv:
$: brew install rbenv
$: rbenv init
Follow instruction that appear.
We suggest using oh-my-zsh for terminal: https://ohmyz.sh/ if you use ohmyzsh, then for previous step add that line to ~/.zshrc
Node installation:
$: brew install nvm
And follow instruction after installation
install node via $: nvm install NODE_VERSION
It is preferred to install LTS version. checkout at nodejs.org
Clone project
Go to gitlab, sign in with @powr.io, setup ssh key and clone the project Here is the docs for setting up ssh: https://docs.gitlab.com/ee/ssh/
Setting up project:
$: gem install bundler
$: bundle install
you may encounter different problems/errors:
- Downloading gem-name revealed dependencies not in the API or the lockfile (faraday (>= 0.8, < 0.10)). Either installing with --full-index or running bundle update oauth2 should fix the problem.
in this case edit Gemfile.lock, under gem-name edit faraday gem versions to match whatever is written in error message, but DO NOT commit Gemfile.lock, just change it back after bundle install finishes.
- problems with installing rmmagic:
follow instructions on error, and this link might help: https://stackoverflow.com/questions/39494672/rmagick-installation-cant-find-magickwand-h
if you are lazy, here are commands:
$: brew unlink imagemagick
$: brew install imagemagick@6 && brew link imagemagick@6 --force
$: npm install
should run without problems
create file: log/development.log,
$: brew install redis
$: rake db:setup
$: rake db:migrate
$: rake db:seed
In google chrome enter: chrome://flags/#allow-insecure-localhost in settings enable: Allow invalid certificates for resources loaded from localhost.
run dev project
$: gem install foreman
$: foreman start -f Procfile.dev
if you have problems with worker being stopped, try installing sidekiq manually
$: gem install sidekiq
Update simple copies: https://www.getoutline.com/doc/how-to-move-simple-copies-around-to-different-servers-riqXgwuubE
Also update app details: https://www.getoutline.com/doc/app_detail-get-data-records-from-real-db-into-local-db-jDrGTMZoTy
Please create config/application.yml, contact other engineers for local ENV Variables.