Skip to content
Patrick Bolger edited this page Jul 26, 2017 · 38 revisions

Note: The following assumes you have a ruby development environment setup on your local machine.

Project Requirements

Step 1: Fork the repository

Forking the project creates a copy of the code base which you can modify without affecting the main code base. Once you are satisfied with your changes, you can make a pull request to the main repository.

Visit the project homepage on GitHub https://github.com/AgileVentures/MetPlus_PETS Fork the project by clicking the Fork button on the top-right hand corner. Wait while the repository is being forked. All done!

Now that you have a fork of the project, copy the URL for the repository (just below the sidebar on the right) and clone the project using Git:

$ cd to/some/directory
$ git clone https://github.com/<your-github-username>/MetPlus_PETS.git

You also need to configure remote to point to the main project repository in order to get latest updates. (This will be required at a later stage when submitting your features)

$ cd MetPlus_PETS
$ git remote add upstream https://github.com/AgileVentures/MetPlus_PETS.git

Step 2: Install Project dependencies

$ bundle install --without production

Step 3: Get "super secret" data

Sensitive or secret information (e.g. email server credentials) are maintained in this file:

config/application.yml

That file will not be present in the environment because it is not maintained in git and thus is not pulled down from github. Contact one of the project members to get the contents of that file (for example via private message in Slack).

Step 4: Update the database

$ bundle exec rake db:migrate
$ bundle exec rake db:seed

See "Note" below regarding subsequent updates to the database.

Step 5: Run the tests

$ bundle exec rspec
$ bundle exec rake cucumber

Discuss any errors with the team.

NOTE REGARDING TESTING JAVASCRIPT: You will need to install chromedriver so that cucumber tests that use the selenium driver can run successfully.

Step 6. Start the server

$ bundle exec rails s

Step 7. Start the DelayedJob process

$ bundle exec rake jobs:work

(we use delayed_job gem for processing certain actions asynchronously - such as sending emails. This process scans the associated DB table for jobs periodically and processes those jobs)

Step 8. Get access to Waffle

We use waffle (from Github) for issues and story tracking. To be added as a collaborator to waffle (so you can take ownership of a story, for example), please provide your Github user name to João Pereira on slack (joaopereira) and ask to be added as a collaborator.

Notes

  1. Updating the database - updates to the development DB (after the first described above) should be performed with this command:
rake db:drop db:migrate db:seed

This is because some of the migration files actually add records to the DB. These need to be present for the seeding to work. (that is, rake db:reset will not work because it does not actually run the migration files, but simply reloads the DB schema from db/schema.rb).

Troubleshooting

You can find some solutions on this page