-
Notifications
You must be signed in to change notification settings - Fork 213
New contributor guide
Brenda Wallace edited this page Sep 8, 2018
·
13 revisions
To start contributing to Growstuff, you'll need to get the code and get a Ruby development environment setup. Here's how.
- Sign up on Github
- Set up Git
- Click the "Fork" button above to fork this repo
- Install PostgreSQL
- Install rvm
- Use rvm to install Ruby. In a terminal, go to your growstuff directory and run
rvm install $(< .ruby-version)
- Create a Ruby gemset. This holds the packages you need for growstuff separate from everything else. Run
rvm gemset create $(< .ruby-gemset)
- Install Bundler:
gem install bundle
Ubuntu linux instruction: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
Needed for the tests to run
Ubuntu Linux:
sudo apt install phantomjs
If you're using Mac OS X and installed PostgreSQL using Postgres.app, run this:
gem install pg -v '0.19.0' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
- Run
bundle install
to install all the remaining dependencies. - Create your test database:
RAILS_ENV=development rake db:create
- Setup your test database:
RAILS_ENV=development rake db:setup
- Copy the example configuration file
config/application.yml.example
toconfig/application.yml
. This file contains API tokens and other secrets which vary from developer to developer, so we can't keep it in version control.
If you run bundle exec rspec
it should run all the tests and have no failures. Yay!
You can also run rails server
then go to http://localhost:3000 in your web browser to try it out.