What you'll learn
How to Build a Ruby Gem
The book will guide you through the process of how to build a Ruby Gem. From bootstrapping the project to releasing to RubyGems.org, you're only a few steps away from publishing a Ruby gem.
Rails provides a variety of lifecycle hooks to integrate functionality in to the framework, but not all of these hooks are well documented. We'll cover the basics to get you started creating gems that include view helpers, asset inclusions, and shared Active Record scopes.
Open source collaboration
Managing and contributing to an open source project can be complex. This guide will help you manage the expectations and collaboration of a successful open source project.
Whether it's configuration patterns or testing best practices, writing code for a Ruby gem is unique. You'll learn techniques to manage and minimize this complexity for good.
Modular Ruby code
The file conventions used within a Ruby gem are common to well organized Ruby applications. The guide will address best practices related to loading dependencies and testing modular Ruby code.
Increased Understanding of Bundler
Bundler is a powerful gem that allows Ruby developers to easily mananage dependencies. Learn about some lesser known features of Bundler to help you ease the pain of common Ruby gem maintenance tasks.
Build a Ruby gem is an absolute gem! It is a great intro to the open source world and Ruby gem patterns. Both beginner and advanced programmers will learn something new.
I found Build a Ruby Gem to be a really useful resource in understanding how gems work and how best to build them. In particular I thought there was a lot of good "real world tips" to make the process go more smoothly.
- 1 - Introduction
- 2 - Structure
- 3 - Testing
- 4 - Code
- 5 - Release
- 6 - Versioning
- 7 - Changelog
- 8 - Responsibility
- 9 - Loading
- 10 - Command-line Executables
- 11 - Configuration Patterns
- 12 - Rails Hooks
- 13 - Rails View Helpers
- 14 - Rails Controller Includes
- 15 - Rails Model Includes
- 16 - Rails Rake Tasks
- 17 - Rails Generators
- 18 - Rails Engines (sample chapter)
- 19 - Open Source Projects
Everything you need to start building Ruby Gems!
Learn the conventions and best practices of build a Ruby gem and launch your open source career today.
The book is 19 chapters, totaling 136 pages. Its content ranges from how to get started with open source projects to the nitty gritty of configuration patterns in a Ruby gem.
In addition to the book, I have packaged the code from all 14 technical chapters — several of which include Rails applications with the sample gem code mounted. This is the perfect package if you want down to the code level and really get your hands dirty.
Lastly, I have generated 14 screencasts totaling over 2 hours of video content detailing my workflow. I go through the process of writing the code for each technical chapter and discuss the benefits and downsides to various approaches.
Build a Ruby Gem Screencast Preview
What formats will you support?
The book is available in .pdf, .epub and .mobi formats.
What if I hate it?
If you feel that strongly, I'm happy to issue a refund within the first 30 days.
Can I read a sample chapter?
Of course! There's one linked above in the chapter list.
You didn't answer my question...