Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Update installed gems

Reply
Thread Tools

Update installed gems

 
 
Dale Martenson
Guest
Posts: n/a
 
      08-09-2005
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?





 
Reply With Quote
 
 
 
 
Ezra Zygmuntowicz
Guest
Posts: n/a
 
      08-09-2005

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.
HTH-
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
509-577-7732
http://www.velocityreviews.com/forums/(E-Mail Removed)



 
Reply With Quote
 
 
 
 
Dale Martenson
Guest
Posts: n/a
 
      08-09-2005

---- 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.




 
Reply With Quote
 
Chad Fowler
Guest
Posts: n/a
 
      08-10-2005
On 8/9/05, Dale Martenson <(E-Mail Removed)> wrote:
>=20
> ---- Original message from Ezra Zygmuntowicz on 8/9/2005 12:28 PM:
>=20
> > 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.
>=20
>=20


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.

--=20
Chad Fowler
http://chadfowler.com
http://rubycentral.org=20
http://rubygarden.org=20
http://rubygems.rubyforge.org (over 700,000 gems served!)


 
Reply With Quote
 
Dale Martenson
Guest
Posts: n/a
 
      08-10-2005
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
---- Original message from Chad Fowler&nbsp; on 8/10/2005 6:41 AM:
<blockquote cite="(E-Mail Removed)"
type="cite">
<pre wrap="">On 8/9/05, Dale Martenson <a class="moz-txt-link-rfc2396E" href="(E-Mail Removed)">&lt;dmarten (E-Mail Removed)&gt;</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">---- Original message from Ezra Zygmuntowicz on 8/9/2005 12:28 PM:

</pre>
<blockquote type="cite">
<pre wrap="">On Aug 9, 2005, at 10:18 AM, Dale Martenson wrote:

</pre>
<blockquote type="cite">
<pre wrap="">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
&lt;blah&gt;" 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?
</pre>
</blockquote>
<pre wrap="">
$ 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.

</pre>
</blockquote>
<pre wrap="">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.


</pre>
</blockquote>
<pre wrap=""><!---->
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:

<a class="moz-txt-link-freetext" href="http://yourserver.whatever.org/yaml">http://yourserver.whatever.org/yaml</a>
and
<a class="moz-txt-link-freetext" href="http://youserver.whatever.org/gems/mygems.gem">http://youserver.whatever.org/gems/mygems.gem</a>

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

</pre>
</blockquote>
Thanks for the information. I will give it a try.<br>
</body>
</html>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating binary gems, from source gems Patrick Hurley Ruby 0 03-04-2007 09:47 PM
Problem getting gems/listing gems. EINVAL Thaddeus L Olczyk Ruby 0 08-15-2006 05:26 AM
Gems -- #include <gems.hpp> Tomás C++ 7 03-05-2006 02:48 PM
'private' gems/gems hierarchy Dany Cayouette Ruby 3 11-25-2005 10:55 PM
Confusion about gems and non-gems working together. Lloyd Zusman Ruby 3 06-20-2005 11:23 PM



Advertisments