How to deploy a RubyGem based server

We built our own ruby ​​socket server and packaged it as a gem. Since this is an internal project, we cannot just publish it to RubyForge or GitHub. I tried to set up our own gem server, but the gem was not authenticating over https. Our other deployments are the standard rails apps that use capistrano and svn to deploy.

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

  • Check the code from svn
  • Build a gem
  • Install a gem
  • Reboot the server

It's just inconvenient and makes gem packing an extra job, but outside of the deployment problem, it works great as a gem.

Is there a cleaner approach?

+1


source to share


3 answers


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

      

develop something on the client machine



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

      

use

gem update YourGem #on client machine

      

Maybe you need to use https, but I don't understand why in your post. On some machines

* Check out the code from svn #the railspart not in the gem
* gem update  YourGem #  or install if not exist....
* Restart the server

      

+2


source


You can install gems from your local filesystem.

gem install /path/to/some.gem

      



Don't need too hard for you to script scp with this or use NFS mount etc.

+2


source


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

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

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

0


source







All Articles