How to contribute to open source

A guide for Rails beginners

December 1, 2021 Ā· Felipe Vogel Ā·

Hereā€™s how I recently got started contributing to open-source Ruby projects. Iā€™m pretty new to Ruby, so if I can do it then you can too! (For more tips for beginning Rubyists, see my study plan.)

UPDATE: If you donā€™t mind watching a video, I suggest hopping right over to the RubyConf talk Your First Open-Source Contribution by Rachael Wright Munn.

Find a project

Ruby for Good makes software for nonprofit organizations, and is a good place to start as a first-time contributor. Some of their projects have a Slack community, which could come in handy as you learn your way around a project.

If you want to widen your search, see:

As you consider which project to contribute to, keep these questions in mind:

Set up the project on your local machine

Once youā€™ve chosen a project, follow the setup instructions in the README or CONTRIBUTING. You will probably run into problems; use your Google-fu to solve them.

Become familiar with the codebase

Poke around and get a feel for what the app does and how it works. Here are some good starting points in a Rails app:

Find and fix an issue

You can follow roughly these steps:

  1. Make sure youā€™ve read the projectā€™s README and (if it has one) CONTRIBUTING.
  2. Find an issue that is well-described and seems simple to fix. Often (but not always) these are tagged as ā€œGood First Issueā€.
  3. At this point, some projects prefer that you claim the issue or leave a comment. Be sure to follow the projectā€™s contributing guidelines. Once you have the OK from the project maintainers, or if there are no pre-contributing steps, then itā€™s time to work on the issue.
  4. Reproduce the issue on your local machine.
  5. Write a test that fails because of the issue. (Not all projects require this, but itā€™s a good rule of thumb.)
  6. Fix the issue, and make sure your new test passes.
  7. Send back your fix by creating a PR (pull request). To learn how to make a PR, follow the steps in First Contributions. Here is another guide with a few extra steps that are good to keep in mind. Also, if you find that youā€™ve cloned a projectā€™s repo before forking it, hereā€™s a guide that explains how to get back on track by making your local copy point to your fork.
  8. Patiently wait for feedback from the project maintainers. Your PR may get pushback, or (worse) it may be ignored. If your PR isnā€™t accepted despite your best efforts, dust yourself off and try again in a different project.

Conclusion

If all goes well, your pull request will be accepted and you will have made your first contribution to open source! šŸŽ‰ From there you can keep an eye out for new issues in your favorite projects so that you can make even more contributions.

And if you want to go further as an open-source contributor, you might want to check out the book How to Open Source by Richard Schneeman.

šŸ‘‰ Newer: An AI story writer šŸ‘ˆ Older: From teacher to developer šŸš€ Back to top