Skip to content

iamstephenliu/HiveCHI-rwm

 
 

Repository files navigation

HiveCHI-rwm

The home of Ride With Me, a youth, point-to-point, peer-to-peer, transportation solution.

Current Build Status:

Build Status

Contributing:


When you begin working on an issue:

  1. make sure nobody else is already working on it;
  2. assign the issue to yourself;
  3. add the In Progress label;
  4. create a new branch and name it with the issue number in front of it (eg. 110-css-work).

If you are no longer working on an issue:

  1. immediately remove the In Progress label, so that someone else can work on it;
  2. if you have partial changes committed and pushed to the branch, add a comment to the issue explaining what's done and what's still missing.

When you complete your work on the issue:

  1. commit and push your branch;
  2. create a pull request.

When you merge a pull request:

  1. remove the In Progress label;
  2. close the issue.

Local Development Setup


###Try an IDE in the cloud We recommend Cloud 9.

When creating a new workspace, copy this url into the "Clone from Git or Mercurial" text box: git@github.com:MozillaHive/HiveCHI-rwm.git

Using rbenv

Prerequisites

You will need to have Postgres installed and running.

On OS X, you can just download Postgres.app from http://postgresapp.com and run it.

This guide will assume you are using rbenv for Ruby. You could use rvm instead.

To quickly set up rbenv on OS X with Homebrew, first pour with

    brew update && brew install rbenv ruby-install

Then to your .bash_profile add the line

    if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

and reload your profile

    source ~/.bash_profile

To run some tests, you will need phantomjs. With Homebrew:

    brew install phantomjs

Instructions

  1. Clone the repository locally, and change to the working directory.

     git clone https://github.com/MozillaHive/HiveCHI-rwm.git
     cd HiveCHI-rwm
    
  2. Install the correct version of Ruby. Using rbenv:

     rbenv install
     rbenv rehash
    
  3. Install Bundler.

     gem install bundler
     rbenv rehash
    
  4. Use Bundler to set up the required gems.

     bundle install
     rbenv rehash
    
  5. Now set up the database (if this doesn't work, there are detailed instructions for configuring Postgres here).

     rake db:create
     rake db:migrate
    
  6. Seed the database with test data.

     rake db:seed
    
  7. Fill in config/application.yml. Twilio test credentials should be available here. If you encounter issues with these, set PHONE_VERIFICATION to DISABLED and you will still be able to register new user accounts.

  8. Now you can run the tests with

     bundle exec rspec
    
  9. Finally, start the server.

     rails s
    
  10. If everything went right, the application should now be running locally at http://localhost:3000/.

  11. If the ruby version is ever updated, rerun these steps to install the new version:

    rbenv install
    gem install bundler
    bundle install
    

###Try using Vagrant Note Vagrant setup is completely optional. If you are having trouble setting up locally, this may be a valid option.

This Vagrant config was set up using railsbox.

####Requirements You will need VirtualBox, vagrant and ansible to be installed. ansible also requires Python and some Python modules to be installed.

####Setup

cd /path/to/rails/project/railsbox/development

vagrant up

vagrant will download the base box and provision it with ansible using your configuration (this will take ~15-20 minutes if this is your first time using vagrant).

Note that vagrant may ask for a sudo password. That's required when you're using NFS for folder synchronization.

Once it's done, you'll be able to login into it using vagrant ssh command. The application is stored in /HiveCHI-rwm directory.

To start the app,

rails s -b0.0.0.0

The app can be hit locally on your machine at 192.168.20.50:3000/

About

The home of Ride With Me, a youth, point-to-point, peer-to-peer, transportation solution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 83.6%
  • HTML 10.2%
  • JavaScript 5.1%
  • Other 1.1%