Update installed gems

I build my own gems as a way to distribute a variety of utilities where I work. What is the best way to install updates?

If I distribute a new gem file, provided by email/ftp/web how can a user install the update? Should they just re-install? "gem update <blah>" doesn't seem to have a "--local" option. If you place the file in your current directory, it seems to be ignored and I am not sure how to specify a gem update file. While "gem install" will automatically look both for the gem locally and remotely, "gem update" doesn't.

Maybe, this is a bad question since "gem update" is meant to look for updates that are not locally available. But this doesn't seem consistent with the way "gem install works".

How difficult is it to implement a simple gem server?

$ gem_server
On the command line. This serves you rdoc documentation and it can act as a local gem repository server. I've never set up the local repo so perhaps someone else can chime in./ But it already has features to do exactly what you want.
HTH-
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
509-577-7732
ezra@yakima-herald.com

···

On Aug 9, 2005, at 10:18 AM, Dale Martenson wrote:

I build my own gems as a way to distribute a variety of utilities where I work. What is the best way to install updates?

If I distribute a new gem file, provided by email/ftp/web how can a user install the update? Should they just re-install? "gem update <blah>" doesn't seem to have a "--local" option. If you place the file in your current directory, it seems to be ignored and I am not sure how to specify a gem update file. While "gem install" will automatically look both for the gem locally and remotely, "gem update" doesn't.

Maybe, this is a bad question since "gem update" is meant to look for updates that are not locally available. But this doesn't seem consistent with the way "gem install works".

How difficult is it to implement a simple gem server?

---- Original message from Ezra Zygmuntowicz on 8/9/2005 12:28 PM:

···

On Aug 9, 2005, at 10:18 AM, Dale Martenson wrote:

I build my own gems as a way to distribute a variety of utilities where I work. What is the best way to install updates?

If I distribute a new gem file, provided by email/ftp/web how can a user install the update? Should they just re-install? "gem update <blah>" doesn't seem to have a "--local" option. If you place the file in your current directory, it seems to be ignored and I am not sure how to specify a gem update file. While "gem install" will automatically look both for the gem locally and remotely, "gem update" doesn't.

Maybe, this is a bad question since "gem update" is meant to look for updates that are not locally available. But this doesn't seem consistent with the way "gem install works".

How difficult is it to implement a simple gem server?

$ gem_server
On the command line. This serves you rdoc documentation and it can act as a local gem repository server. I've never set up the local repo so perhaps someone else can chime in./ But it already has features to do exactly what you want.

I will give that a try, but it seems like it is meant to serve your installed gems. If someone wanted to host and variety of gems (different versions of gems -- stable, bleeding edge, etc.), I don't think "gem_server" is the answer. Any ideas what is? Or am I understanding this incorrectly.

Hi. gem_server can definitely do what you want. You can serve gems
from an alternate directory (with the -d param) if you want to include
a lot of bleeding edge gems that you don't want "installed" on the
host system. Also, if you look in the rubygems distribution under the
"bin" directory, you'll find generate_yaml_index.rb, which you can
use to create a static yaml file that you could serve with your web
server of choice. So you'd have:

http://yourserver.whatever.org/yaml
and
http://youserver.whatever.org/gems/mygems.gem

If you have that structure available, you can serve gems from a
normal web server.

···

On 8/9/05, Dale Martenson <dmartenson@multitech.com> wrote:

---- Original message from Ezra Zygmuntowicz on 8/9/2005 12:28 PM:

> On Aug 9, 2005, at 10:18 AM, Dale Martenson wrote:
>
>> I build my own gems as a way to distribute a variety of utilities
>> where I work. What is the best way to install updates?
>>
>> If I distribute a new gem file, provided by email/ftp/web how can a
>> user install the update? Should they just re-install? "gem update
>> <blah>" doesn't seem to have a "--local" option. If you place the
>> file in your current directory, it seems to be ignored and I am not
>> sure how to specify a gem update file. While "gem install" will
>> automatically look both for the gem locally and remotely, "gem
>> update" doesn't.
>>
>> Maybe, this is a bad question since "gem update" is meant to look
>> for updates that are not locally available. But this doesn't seem
>> consistent with the way "gem install works".
>>
>> How difficult is it to implement a simple gem server?
>
>
> $ gem_server
> On the command line. This serves you rdoc documentation and it can
> act as a local gem repository server. I've never set up the local
> repo so perhaps someone else can chime in./ But it already has
> features to do exactly what you want.
>
I will give that a try, but it seems like it is meant to serve your
installed gems. If someone wanted to host and variety of gems (different
versions of gems -- stable, bleeding edge, etc.), I don't think
"gem_server" is the answer. Any ideas what is? Or am I understanding
this incorrectly.

--
Chad Fowler
http://chadfowler.com

http://rubygems.rubyforge.org (over 700,000 gems served!)

---- Original message from Chad Fowler on 8/10/2005 6:41 AM:

> > ---- Original message from Ezra Zygmuntowicz on 8/9/2005 12:28 PM:
> > > > 
> > > > I build my own gems as a way to distribute a variety of utilities
> > > > where I work. What is the best way to install updates?
> > > > If I distribute a new gem file, provided by email/ftp/web how can a
> > > > user install the update? Should they just re-install? "gem update
> > > > <blah>" doesn't seem to have a "--local" option. If you place the
> > > > file in your current directory, it seems to be ignored and I am not
> > > > sure how to specify a gem update file. While "gem install" will
> > > > automatically look both for the gem locally and remotely, "gem
> > > > update" doesn't.
> > > > Maybe, this is a bad question since "gem update" is meant to look
> > > > for updates that are not locally available. But this doesn't seem
> > > > consistent with the way "gem install works".
> > > > How difficult is it to implement a simple gem server?
> > > $ gem_server
> > > On the command line. This serves you rdoc documentation and it can
> > > act as a local gem repository server. I've never set up the local
> > > repo so perhaps someone else can chime in./ But it already has
> > > features to do exactly what you want.
> > I will give that a try, but it seems like it is meant to serve your
> > installed gems. If someone wanted to host and variety of gems (different
> > versions of gems -- stable, bleeding edge, etc.), I don't think
> > "gem_server" is the answer. Any ideas what is? Or am I understanding
> > this incorrectly.
> 
> Hi. gem_server can definitely do what you want. You can serve gems
> from an alternate directory (with the -d param) if you want to include
> a lot of bleeding edge gems that you don't want "installed" on the
> host system. Also, if you look in the rubygems distribution under the
> "bin" directory, you'll find generate_yaml_index.rb, which you can
> use to create a static yaml file that you could serve with your web
> server of choice. So you'd have:
> [http://yourserver.whatever.org/yaml](http://yourserver.whatever.org/yaml)
> and
> [http://youserver.whatever.org/gems/mygems.gem](http://youserver.whatever.org/gems/mygems.gem)
> 
> If you have that structure available, you can serve gems from a
> normal web server.

Thanks for the information. I will give it a try.

···

On 8/9/05, Dale Martenson dmartenson@multitech.com wrote:

On Aug 9, 2005, at 10:18 AM, Dale Martenson wrote: