17

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

zanona
  • 12,345
  • 25
  • 86
  • 141
  • I'm looking for the exact same thing. So far I've only found how to run your own gem server (not to difficult actually) Currently I've resorted to using a CI server to build my gems and all apps that use those gems, then the CI server does a deploy by vendoring the gem so it doesn't need to be accessed publicly – brad Aug 03 '10 at 13:01
  • Cheers for that brad, I will try to follow you then, btw, what's a CI server? – zanona Aug 03 '10 at 13:28
  • Continuous integration -- check source in. CI builds the application and its dependencies. – Toybuilder Jul 19 '11 at 23:11

3 Answers3

11

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 <server>.

  • Pros: Extremely easy to setup. Can be launched on any port.
  • Cons: 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.

  • Pros: Offers key based authentication
  • Cons: 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.

  • Pros: Offers key based authentication
  • Cons: Have to pull the source, build, then install the gem on each update. Costs 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.

Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
quest
  • 776
  • 5
  • 14
9

Check out Gem in a Box.

madh
  • 648
  • 9
  • 14
  • +1 for `geminabox`. By the way check out my [geminabox](https://hub.docker.com/r/spoonest/geminabox/) docker image. It helps me to deploy `geminabox` server in a minute. – Yuri Karpovich May 03 '16 at 22:35
6

Take a look at Gemfury if you prefer a cloud solution.

Disclaimer: I work on this

Michael
  • 1,139
  • 11
  • 11