views:

112

answers:

1

Hello there,
By any chance, is there any place it's possible to host private ruby gems? So I could allow it to be pulled only for specific places by using public key or something like that?

Thanks

+1  A: 

There is a few options for you...

  • GEM SERVER -

Install the gem on any server you want to distribute it from. Then run "gem server" on the machine. This will start up a small gem server that can be queried by anyone. Then just add the new gem source to the client machines. "gem sources -a ".

Pro's - Extremely easy to setup. Can be launched on any port.
Con's - Doesn't offer key based authentication.

  • GITOSIS -

Setup a gitosis server and store the gem source code on there. Then just pull from the repo and build the gem when you need to update it. Yes it is an extra couple of steps to build and install the gem, however you will get key based authentication for better security.

Pro's - Offers key based authentication
Con's - Have to pull the source, build, then install the gem on each update. You also have to actually setup the gitosis server.

  • GITHUB -

Exact same thing as gitosis, but you have to pay to make it private. This requires no setup if you can afford it.

  • Pro's - Offers key based authentication
  • Con's - Have to pull the source, build, then install the gem on each update. Cost's a little money.

Unfortunately, none of the major gem services do exactly what you need. Github stopped building gems, and RubyGems doesn't offer any private gem hosting. Hopefully one of the tools above will work well enough for you. Personally I would just go with the gem server option, then lock the machine down by IP, or some other access restriction. I know its not perfect, but it works and is quick/easy to setup.

quest