Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.
Jason Liu edited this page Jun 6, 2014 · 16 revisions

#Development Setup Shifts currently uses ruby 1.9.3-p374 and rails 3.0.9. We are migrating to rails 3.2.

##Rbenv Setup Install rbenv and ruby-build.

OS X Homebrew method:
Note: The rbenv repository install instructions don't have the third step, and omitting it can cause issues.

$ brew update
$ brew install rbenv ruby-build
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

Otherwise:

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Now check if rbenv was set up:

$ type rbenv
#=> "rbenv is a function"

##Getting Setup

Download the application:
git clone https://github.com/YaleSTC/shifts.git && cd shifts

Install Ruby version 1.9.3: rbenv install 1.9.3-p374

While in the shifts project directory, set the ruby to use to be 1.9.3 rbenv local 1.9.3-p374

Install mysql: brew install mysql

  • bundle install
  • If your mysql root has a password, set it in /config/database.yml
  • rake db:create
  • rake db:migrate
  • rails server
  • Point your browser to localhost:3000 to see the application!

For Mac users, Pow is a fast alternative to running rails server.

##Branches We have two halves to the application currently: Rails 2 is stable and we're working on upgrading to Rails 3.

Rails 2

  • Master = rails2_master
  • Development = rails2

Rails 3

  • Master = master
  • Development = rails3.2

##Workflow We work off of development (rails3.2). Developers don't make commits on development directly, but instead make a branch for each feature being worked on. Branches are usually named with lowercase_with_underscores, with the issue number preceding it. For example, the branch fixing issue #204 is called 204_new_hash_syntax.

To make a new branch, use git checkout -b new_branch_name.
Later, after the code has been reviewed and approved, we merge back into development.

Clone this wiki locally