Install rvm
\curl -sSL https://get.rvm.io | bash -s stable --rubyFollow the post install instructions to source rvm and get started.
Install Ruby version 2.4.1
rvm install 2.4.1Install Postgresql & Redis
brew install postgresql
brew install redisInstall Yarn
brew install yarnCopy Config Files
cp cadet_config.example.yml cadet_config.yml
cp secrets.example.yml secrets.ymlInstall Bundler
gem install bundlebundle installInstall Packages
yarn installCreate Database & Migrate
rails db:create
rails db:migrateAdd AWS Environment Variables
Generate an API Access Key Id and Secret Key and set the environment variables
export AWS_ACCESS_KEY_ID="<AWS_ACCESS_KEY_ID>"
export AWS_SECRET_ACCESS_KEY="<AWS_SECRET_ACCESS_KEY>"Run Sidekiq & Rails Server
bundle exec sidekiq -q default -q mailers
bundle exec rails serverIn other terminal tab, run webpack
./bin/webpack-dev-serverDeploying to Production
bundle exec cap production deployConnecting to Production Instance
Make sure the SSH config is appropriately created
host *getcadet.com
# IdentityFile ~/.ssh/
IdentityFile ~/.ssh/id_digital_ocean_rsa
IdentitiesOnly yes
ForwardAgent yes
ssh -i ~/.ssh/id_digital_ocean_rsa [email protected]