Running a private gem server

Greg Willits's Avatar

Greg Willits

22 Oct, 2010 07:48 PM

I'm trying to run my own gem server of a specific folder--not the default gems folder for the machine. None of it is working.

First, I created a folder called /privateGems at the root of my server. Then I started gem server --dir=/privateGems

I tried to push a gem from my local machine to my server using info here:
http://help.rubygems.org/discussions/questions/14-running-our-own-g...

RUBYGEMS_HOST=http://my.server.com:8808 gem push pkg/mygem-0.1.0.gem

That asked for my credentials or something, so I bailed -- seems like it was still trying to push to the rubygems.org.

I resorted to copying all the source to the server, and doing a local install with the option -i /privateGems which at least got the gems installed where I wanted them for now.

Then I ran gem generate_index --directory=/privateGems -- that spit out a bunch of files in the /privateGems folder, but they're all pretty much empty. AFAICT none of my gems actually got indexed.

From my local machine, if I gem list --source=http://my.server.com:8808 I get a list of the gems in ruby's .../1.8/gems folder and not my /privateGems folder.

I've looked at about a half dozen blog, and read the gem help. One would infer that it should be a simple thing to accomplish.

So, I'm confused.

A) gem server isn't actually serving the folder I told it to
B) gem generate_index isn't indexing anything
C) I can't push anything to my private server

All-in-all none of the gem server stuff is working like I'm expecting it to, and I don't see what I've done wrong.

Any guidance here would be greatly appreciated.

-- gw

  1. 1 Posted by greg willits on 29 Oct, 2010 08:25 PM

    greg willits's Avatar

    bump.
    or, is this not the right place to ask?

  2. Support Staff 2 Posted by Nick Quaranto on 29 Oct, 2010 09:16 PM

    Nick Quaranto's Avatar

    Hi there,

    The RubyGems built-in server does not support gem push...that's through gemcutter only (http://github.com/rubygems/gemcutter)

    Usually what I recommend for internal installs is geminabox:

    http://github.com/cwninja/geminabox/

    Unless if you're hosting 1000's of gems, geminabox does the job nicely. Sorry about the delay here.

  3. 3 Posted by Greg Willits on 30 Oct, 2010 02:26 AM

    Greg Willits's Avatar

    So the whole built-in gem server thing is out of favor?

    Giving geminabox a whirl, but it crashes trying to serve a gem.
    Hopefully, the author will see my Issues post on github.

    Thx for the reply.

    -- gw

  4. Support Staff 4 Posted by Nick Quaranto on 05 Nov, 2010 01:03 AM

    Nick Quaranto's Avatar

    I wouldn't say it's out of favor, it just doesn't respond to gem push...only gemcutter does (and I believe geminabox). You could always regenerate the index (gem generate_index) and serve it up via gem server...but geminabox will probably be easier.

  5. Nick Quaranto closed this discussion on 05 Nov, 2010 01:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

30 Oct, 2014 04:34 PM
30 Oct, 2014 02:46 PM
28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM