csexton
csexton

Reputation: 24813

How to deploy an RubyGem-based Server

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:

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?

Upvotes: 1

Views: 857

Answers (3)

Jonke
Jonke

Reputation: 6533

Start

gem server #That will serve all your local installed gems.

gem install YourLocalPkg1.X.X.gem

#on YourHost

use

gem sources --add localhost:8808
gem install YourGem

on client machine develop something

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

use

gem update 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  YourGem #  or install if not exist....
* Restart the server

Upvotes: 2

Pistos
Pistos

Reputation: 23812

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.

Upvotes: 2

JasonTrue
JasonTrue

Reputation: 19654

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

Upvotes: 0

Related Questions