-
Install Dependencies (git, rails, redis, ...)
i. Install git
ii. Install rails
iii. Install ruby
iv. Install postgres
v. Install redis
-
Retrieve codebase
-
Setup database
-
Setup environment
-
Run codebase
-
Run tests
-
Interact With Codebase
Git is a distributed version control system. This is how our code is stored and managed. Git can be frustrating, but it is an essential tool. If you want to learn more about Git, a great resource is Think Like a Git. If you find yourself in a real git pickle, see "Oh, shit, git!". If you have already installed Git as a part of the Docker Toolbox, you don't need to install it again using the following link.
Rails is required to run locally.
Mac: COMING SOON
Windows: COMING SOON
Linux: COMING SOON
Rails is required to run locally.
Mac: https://gorails.com/setup/osx/10.13-high-sierra
Windows: COMING SOON
Linux: COMING SOON
Redis is required to run locally.
Mac: COMING SOON
Windows: COMING SOON
Linux: COMING SOON
You are now ready for the actual OperationCode Backend code base.
-
The common practice is to make a copy of the GitHub repository you want to work on (known as
forkingthe repo), make your changes, and then request to merge those changes back into the project (known as apull request). -
Forking a repo is done through GitHub's web UI. It can be found in the top right corner of the OperationCode Backend's GitHub page.
-
The following commands will pull down the source code from your forked repo.
-
Make sure to replace
[YOUR-GITHUB-NAME]with your GitHub name. (example: https://github.com/iserbit/operationcode_backend.git)
Fork the repo first.
git clone https://github.com/[YOUR-GITHUB-NAME]/operationcode_backend.git operationcode-upstream
cd operationcode-upstream
git remote add upstream https://github.com/OperationCode/operationcode_backend.git- If Bundler is not installed run
gem install bundler. - Run
bundle installto install all of the gems in your Gemfile. - Download and install PostgreSQL if you don't have it already.
1a. Run redis in separate tab.
- Run
cp config/database.yml. config/native_setup_database.yml. - Run
bin/rake db:create. - Run
bin/rake db:migrate. - Run
bin/rake db:seed
- Run
RAILS_ENV=test rake db:test:prepare. - Run
bin/rake test & rubocop.
To run the OperationCode Backend simply type:
rails sYou can now visit http://localhost:3000 (or run make open) and you should see a Rails welcome message!