forked from ucberkeley/Beehive
-
Notifications
You must be signed in to change notification settings - Fork 3
Local Development
Rick Zhang edited this page Sep 9, 2020
·
21 revisions
Install docker
Install rbenv
Install the right version of ruby with rbenv (2.5.6)
rbenv global 2.5.6
rbenv rehash
git clone https://github.com/asuc-octo/Beehive.git
git clone https://github.com/asuc-octo/beehive-secrets
cp beehive-secrets/.env Beehive/
cp beehive-secrets/database.yml Beehive/config/
cp beehive-secrets/Dockerrun.aws.json Beehive/
gem install bundler
brew install libpqxx
brew install postgres
cd Beehive
bundle // re-run whenever you add or remove gems from the Gemfile
Locally this can take 1 of 2 forms.
Method 1: Spinning up the Docker container
cd Beehive
docker-compose up --build
sudo vim /etc/hosts
add “127.0.0.1 beehive.berkeley.edu” to the end of /etc/hosts
Method 2: Running Puma, the local app server.
cd Beehive
rails serve // or rails s
The second method is sufficient most of the time, but the first one is very helpful if you would like to emulate the production environment.
git pull
git push origin [branch-name]
git remote -v // view all remote locations/repos
git branch // view branches and which one you’re on
git checkout [branch-name] // go to branch-name