views:

386

answers:

3

We have built a custom socket server in ruby and packaged it as a gem. Since this is an internal project we can not simply publish it to RubyForge or GitHub. I tried to setup our own gem server but gem would not authenticate over https. Our other deployment is all for standard rails applications that use capistrano and svn for deployment.

Our current setup which is to use a rails-like deployment with capistrano. which does the following:

  • Check out the code from svn
  • Build the gem
  • Install the gem
  • Restart the server

This just seems awkward, and makes the gem packaging seem like extra work -- but outside of the deployment issue it fits really nicely as a gem.

Is there a cleaner approach?

A: 

gem install --local path_to_gem/filename.gem will help. Or you can get a trusted certificate on your web server.

You might be able to install from the server with gem install -P NoSecurity or -P LowSecurity, but I haven't tried that.

http://www.rubygems.org/read/chapter/21

JasonTrue
+2  A: 

You can install gems from the local filesystem.

gem install /path/to/some.gem

Shouldn't be too hard for you to script scp with that, or use an NFS mount, etc.

Pistos
+2  A: 

Start

gem_server #That will serve all your local installed gems.

gem install YourLocalPkg1.X.X.gem

#on YourHost

use

gem install -r http://yourhost:8088 YourGem

on client machine develop something

rake gem
gem install YourLocalPkg2.X.X.gem #on YourHost

use

gem update -r http://yourhost:8088 YourGem #on client machine

Maybe you have a need to use https but I don't see why in your post. On Some Machine

* Check out the code from svn #the railspart not in the gem
* gem update -r http://yourHost:8088 YourGem #  or install if not exist....
* Restart the server
Jonke