Boring Rails

Hacktoberfest Recap: Open source Ruby/Rails work in 2020

Nov 16th, 2020 6 min read

Hacktoberfest is a month long event that encourages developers to contribute to open source – submit four valid pull requests and you win a tshirt. Despite the criticisms and controversy this year, I’m a fan of the event and it did help motivate me to make some contributions.

I wanted to share a recap of my submissions for Hacktoberfest because I think it’s a good sampling of what options are available to folks looking to contribute to Ruby and Rails. There are lots of ways to give back outside of the main rails/rails repository!

My 2020 Hacktoberfest Contributions


Repository: github/view_component

Pull request: Allow preview controller to be customized via config options

The view_component gem helps you organize your server-rended view partials into “components” that are backed by a Ruby class. If you’re familiar with the built-in Rails partials and gems that implement decorator or presenter patterns (like draper), you can think of view_component as a mash-up of those two approaches.

I’ve been playing around with this gem on my own projects and think it’s heading in a great direction. I found an existing issue with a “help-wanted” tag and decided to see if I could add the feature.

The view_component gem allows you to test out your components in a sandbox mode (akin to Rail’s mailer previews). There was a feature request to support customizing the controller used to render these previews in case you want to add authorization or other special application-specific things.

The pull request was merged and release in version 2.20.0

Gems like this are a great starting point for contributing. You certainly have more experience using a gem in your own application than working deep in the Rails internals so adding features or fixing bugs in a gem will be more approachable.

It was extra helpful that the maintainers tagged issues with “help-wanted” and there was low enough “traffic” that I was able to get questions answered and my code reviewed very quickly.


Repository: flyerhzm/bullet

Pull request: Update design for footer notification

The bullet gem is one of my go-to tools when building Rails apps. This gem will flag N+1 queries as you’re developing a feature and alert you to associations you should preload. It’s a lot nicer to find and stamp out these performance problems as you go instead of months later when they appear in production.

You can configure how bullet notifies you of problems. My default preference is a browser popup – it’s annoying but it does drive me to fix the problem instead of ignoring it. But sometimes there are false positives or I’m prototyping a feature and it becomes too much. So I went to switch the configuration to use the “footer” where it would add a banner to the page with the error message.

But I really disliked the design: it took of a ton of space and was, well, ugly.

So I decided to change it. You can see the “Before” and “After” here. The new design is expandable and gets out of the way.

The pull request was merged and will be included in the next release of the gem.


Repository: lrug/

Pull request: Add link to StimulusJS talk slides

LRUG is a local Ruby meetup group in London. While this contribution on GitHub was tiny (merely updating their website with a link to the slides for a talk I gave), it’s still an example of how to contribute to the Ruby community.

Meetups are always looking for volunteer speakers and given that many groups are doing virtual meetups in 2020, I thought it might be fun to branch out from my local meetup (Indianapolis) and offer to speak at two groups in Europe. I gave a talk about using StimulusJS to the Berlin Ruby user group and the London group. It was cool to be an “international speaker” and I was able to take advantage of the timezone difference to simply slot the presentation into my normal workday calendar (lunchtime in the US is evening time in the EU).

Overall I had a great experience and a warm welcome from my new Ruby friends on the otherside of the world.

Ruby For Good: Circulate

Repository: rubyforgood/circulate

Pull request: Add power source field to items

I came across the Ruby For Good organization when looking for projects to contribute to and found that they manage a number of Ruby and Rails projects that help non-profits that need software development work done. There are apps for helping with conservation, diaper banks, volunteer management, and more.

I found a project that is building an inventory management system for tool-lending libraries. The idea is that you can borrow tools from a community pool or schedule time to use machinery that is usually too expensive for an individual to own themselves.

The Ruby for Good projects seem to all have a team of people to help triage and define work items and there is a Slack channel to coordinate and ask questions. I thought it was really neat to be able to contribute to an open source project where you were writing features like most developers do as part of their “normal” job. Writing frameworks and libraries is critical, but it takes a different set of skills and mindset than doing application development.

I was able to get the project up and running locally in under an hour and I banged out a feature to add a new field to Items in the system to record what kind of power source the tool uses.

The pull request was merged and deployed to the Chicago Tool Library app.

Wrap it up

Despite the flaws and issues with incentives, I find Hacktoberfest to personally be a very motivating effort. There are several ways to contribute to the Ruby or Rails open source ecosystems – even if you aren’t keen to dive into a huge framework or project.

You can start by looking at some of your favorite gems and see if there are improvements you can make – after all, your perspective as an end-user is invaluable.

Consider giving a talk at a local (or remote!) user group. No matter how far along in your programming journey you are, you can always share something about what you’ve learned that can help someone else.

And lastly, consider checking our Ruby for Good if you’re looking to practice more of the day-to-day Rails development skills. These projects seem like a great environment for junior developers as they have dedicated folks involved to help review code and write feature specifications.

Did you complete Hacktoberfest? If so, I’d love to hear about your contributions on Twitter.

Was this article valuable? Subscribe to the low-volume, high-signal newsletter. No spam. All killer, no filler.