The home of Ride With Me, a youth, point-to-point, peer-to-peer, transportation solution.
When you begin working on an issue:
- make sure nobody else is already working on it;
- assign the issue to yourself;
- add the In Progress label;
- 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:
- immediately remove the In Progress label, so that someone else can work on it;
- 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:
- commit and push your branch;
- create a pull request.
When you merge a pull request:
- remove the In Progress label;
- close the issue.
###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
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
-
Clone the repository locally, and change to the working directory.
git clone https://github.com/MozillaHive/HiveCHI-rwm.git cd HiveCHI-rwm
-
Install the correct version of Ruby. Using rbenv:
rbenv install rbenv rehash
-
Install Bundler.
gem install bundler rbenv rehash
-
Use Bundler to set up the required gems.
bundle install rbenv rehash
-
Now set up the database (if this doesn't work, there are detailed instructions for configuring Postgres here).
rake db:create rake db:migrate
-
Seed the database with test data.
rake db:seed
-
Fill in
config/application.yml
. Twilio test credentials should be available here. If you encounter issues with these, setPHONE_VERIFICATION
toDISABLED
and you will still be able to register new user accounts. -
Now you can run the tests with
bundle exec rspec
-
Finally, start the server.
rails s
-
If everything went right, the application should now be running locally at http://localhost:3000/.
-
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.
- VirtualBox
- Vagrant
- Ansible (Mac users:
brew install ansible
)
####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/