Last Updated: February 25, 2016
·
2.587K
· mcansky

Private Gem server

During a relax time at a conference I heard someone speaking about private gems servers. I had been wondering about how to do such a thing for some time. Good practices requires us to split up the code as much as we can and to do that gems are perfect. Yet it's not always possible to publish all the gems we do with some clients and companies.

A private gem server allows you to keep your precious gems from others, yet making them easy to reach from your hosts.

I could not remember who was talking about it so I asked google. Well I did find some solutions : a SaaS provider, a gem, and a bare ruby one.

Furies, furies all over

http://www.gemfury.com popped up several times in my search, it supports Gems but also Python and Npm packages. Always a plus in our times. It would probably be nice to try it out and see what it's about and how it works, but the prices make me wonder ... After all a double server setup is only 10$/month away lately ...

The gem box

http://tomlea.co.uk/posts/gem-in-a-box/ is an open source project aimed at providing an easy way to setup an gem server. It seems a bit more tricky and complex of course.

The bare ruby

It seems that it's also quite easy to run a private gem server from ... almost nothing in fact. Jeff Dean tells us about it http://www.jeffmdean.com/2012/3/13/setting-up-a-simple-private-gem-server.

bonus level

If you have seen Benjamin Smith (Pivotal Labs) speaking at conferences about Gems' security you might also understand the point of using such private gem servers as main gems repositories. In those private servers you can store certified, verified versions of the gems your products use.

related

EDIT : super bonus

Another way to store and handle your private gems is to use private repositories from Github, BitBucket, ... Bundler will be able to get them and while you will pass the git repository url in the Gemfile you can also specify a branch, allowing you to pass specific code for specific branches of your app too.