# How to start Atlas locally
### Prepare the environment
- Install RVM or Rbenv
- Instal NVM
- Install Ruby 2.4.4 with `rvm install 2.4.4`
- Install Node 8 with `nvm install 8`
- Install yarn with `npm install yarn -g`
- `which ruby` should show rvm/rbenv ruby path
- `which gem` should show rvm/rbenv gem path
- `which bundle` should show rvm/rbenv bundle path
### Install MongoDB
- Install MongoD according to this tutorial `https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/`
### Restore DB
- Download DB dump file from `https://thinfi.com/dkpd` ask our manager for the password
- Untar the file with `tar xzf <file_name>`
- Enter db folder
- Restore db using `mongorestore -d decision_makers_development`
### Get access to the project
- Generate a ssh key with `ssh-keygen`
- Create a GitLab account
- Past the public key to your GitLab profile
- Send your GitLab profile to our manager so he can give you access to the project
### Clone the project
- Clone the project with `git clone <project_ssh_link>`
- Go to project folder and run:
- `rvm use 2.4.4` if you have more than one ruby version installed
- `nvm use 8` if you have more than one node version installed
- `bundle install` to install our gems
- `yarn install` to install our packages
- There are two forms to handle the assets, you can precompile them or compile them on runtime, see commands below:
- Precompile assets with `bundle exec rake assets:precompile`
- Compile assets on runtime with `./bin/webpack-dev-server` <b>To use this command you must have run `yarn install`</b>
- Do not forget to comment the lines `pidfile`, `state_path` and `stdout_redirect` on puma/development.rb