-
Notifications
You must be signed in to change notification settings - Fork 212
New contributor guide
Mackenzie edited this page Oct 12, 2023
·
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
The easiest way to get hacking is to start a new codespace.
Once the container is built, start your application and login
- 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 bundler
- Install the gems:
bundle install
You'll need to brew install shared-mime-info
before running bundle install
Ubuntu linux instruction: https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
This is used (headless) when running the tests/specs
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. - 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. - Create your test database:
RAILS_ENV=development rake db:create
- Setup your test database:
RAILS_ENV=development rake db:setup
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.