Why I'm Excited About Rails Bytes
Tags: ruby, rails
Published: 2020-05-18 15:04:59

When [Chris](https://twitter.com/excid3) and [Andrew](https://twitter.com/andrewfomera) first told me about [Rails Bytes](https://railsbytes.com) I thought to myself, "sure Rails can frustrate me sometimes, but it doesn't suck..." 👀

Once I learned that it didn't mean "Rails bites," I stopped what I had set out to work on that raining Sunday and shifted all my attention to Rails Bytes.

**Rails Bytes is a repository of hosted Ruby on Rails templates.**

Ruby on Rails is [omakase](https://rubyonrails.org/doctrine/#omakase), and I like a lot of the decisions made for us. However, there are certain [tweaks to the default stack](https://rubyonrails.org/doctrine/#no-one-paradigm) that I often make in Rails applications. 

* Sometimes I swap out Minitest for RSpec; sometimes, I don't.
* Sometimes I use Devise; sometimes, I don't.
* Sometimes I use Draper; sometimes, I don't.
* Sometimes I take payments with Pay; sometimes, I don't.
* I (mostly) always use Factory Bot and Pry.

I'm grateful for how easy it is to make these additions/changes in Ruby and Rails. However, it still takes time to find a library, look for the gem name (underscore or dash?), add it to my Gemfile, bundle install, and then go through all the library-specific setup instructions.

Chris and I started hacking on the [free Jumpstart template](https://github.com/excid3/jumpstart) in 2017 to make some of these decisions when starting a new Rails app. When I fizzled out, Chris open-sourced it and championed it into a fantastic resource for bootstrapping a new Rails application. Many developers have given back to Jumpstart, and it's a solid template.

The problem I've run into over the last couple of years, though, is that I often don't know what libraries I want to use until I've started _building_ the application.

Rails Bytes shines, here.

I can use (or create!) pre-built Rails templates that do one thing, and they do it well.

If I want to [add Devise](https://railsbytes.com/public/templates/X8Bsjx) to my **existing** application, I can run `rails app:template LOCATION='https://railsbytes.com/script/X8Bsjx'`.

If I want to [swap out Minitest for Rspec](https://railsbytes.com/public/templates/z0gsLX) I can run `rails app:template LOCATION='https://railsbytes.com/script/z0gsLX'`. 

If I want to [add TailwindCSS](https://railsbytes.com/public/templates/z5OsqV) I can run `rails app:template LOCATION='https://railsbytes.com/script/z5OsqV'`.

These templates don't just install a gem and run the `rails g` command. Many of them also prompt you for extra configuration options and do the work required to get the libraries up and running. 🙌

In the case of [Factory Bot](https://railsbytes.com/public/templates/XnJsbX) and [Draper](https://railsbytes.com/public/templates/V1bsq4), the templates ask you if you want to generate a Factory or Decorator for all your existing models. 🏄‍♂️

The benefit to tiny, single-focused templates is that they're composable! 😱 I watched Andrew [wire up RSpec, Factory Bot, and Standard](https://railsbytes.com/public/templates/V4YsyX) into a single template.

It's still early, but I'm excited about the future of Rails Bytes. I can't wait to see what templates my fellow Rubyists (you!) build to make our lives easier.

I host a podcast with Chris and work with Andrew at Podia, so I may be biased. However, I'm incredibly excited about this project. So much so that I can't stop thinking about it and I'm learning how to write a DEV.to article about it!

XOXO
Gossip Girl