Over a million developers have joined DZone.

Best Practices for Vendoring Ruby Gems


Keeping your dependencies with your application can save time and effort when switching between multiple projects, especially amongst a team of developers. Balazs Nagy, a part-time Rails developer, explains how to solve this issue by vendoring his Ruby gems. He demonstrates his best practices for vendoring  his gems "with style":

1.    We use rvm
2.    However, we got rid of it’s bundler helpers
3.    We don’t rely on the bundler pool using executables / scripts
4.    … but we have a pool, and we don’t have multiple copies the same gems (ssd is still not cheap)
5.    Most shortcomings of vendoring gems are hidden

Nagy only found one issue with the guard-bundler, which was fixed with a recent update. The full blog post includes an in-depth walk-through and code examples explaining his gem vendoring method.



Published at DZone with permission of Ross Jernigan. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}