- Install rvm:
\curl -sSL https://get.rvm.io | bash
\curl -sSL https://get.rvm.io | bash -s stable --ruby
- Clone your project repos
cd Desktop
mkdir Proyectos
cd Proyectos
git clone [email protected]:PeerStreet/peerstreet.git
git clone [email protected]:PeerStreet/savings.git
- Install your version of ruby
rvm install 2.6.8; rvm use 2.6.8; rvm --default use 2.6.8;
- Setup libraries and gems:
gem install bundler:2.2.19
bundle update --bundler
gem install foreman
brew install shared-mime-info
sudo gem install rmagick -v '4.1.0.rc2'
brew install imagemagick@6
bundle config build.thin --with-cflags="-Wno-error=implicit-function-declaration"
bundle install
brew install chromedriver
-
Go to settings to accept the permissions chromedriver is requesting in: Settings -> Privary & Security -> General
-
Setup db:
brew services start postgresql
createdb peerstreet_development
createdb peerstreet_test
- In
psql --host=localhost --db=peerstreet_development
run:
CREATE USER postgres with PASSWORD 'password';
ALTER USER postgres CREATEDB;
ALTER USER postgres WITH SUPERUSER;
GRANT ALL ON ALL TABLES IN SCHEMA public TO postgres;
- Make sure you have
aws-vault
installed with permissions to the s3 bucket for the db dump (or have kue setup) - Clone production sanitized DB
kue db:copy -l peerstreet_development -s retail
- For test environment you need to load an empty database from the schema:
bundle exec rake db:schema:load RAILS_ENV=test
-
Create your
config/application.yml
file -
Run:
yarn add webpack
yarn global add node@v14
yarn global add node-sass
yarn install
yarn install --check-files
- Turn on redis in background:
brew services start redis
(Check it's alive with ps aux | grep redis-server
)
- By this time tests should be running:
bundle exec rspec
- Start server with
foreman start -f Procfile.dev -p 5000
- Setup crontab
crontab -e
to be this:
*/5 * * * * sudo sntp -sS time.apple.com
* 0 * * * rm /Users/leti/Desktop/Proyectos/peerstreet/log/scout_apm.log
* 0 * * * rm /Users/leti/Desktop/Proyectos/peerstreet/log/development.log
* 0 * * * rm /Users/leti/Desktop/Proyectos/peerstreet/log/test.log
* 0 * * * rm -rf /Users/leti/Desktop/Proyectosna/peerstreet/tmp/
- Gitignore global (
vim ~/.gitignore
) this stuff:
janus_patch.rb
bifrost_patch.rb
dump.rdb
dumpdb.sh
setupch.sh
env.sh
.DS_Store
.idea/
- Install Ruby Mine
brew install --cask rubymine
-
Sign in to your Jetbrains account to get the license activated (talk to IT if first time)
-
Open projects
-
Mark as excluded the vendor and node_modules folder