Update installed gems

Discussion in 'Ruby' started by Dale Martenson, Aug 9, 2005.

  1. 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?
     
    Dale Martenson, Aug 9, 2005
    #1
    1. Advertising

  2. 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
     
    Ezra Zygmuntowicz, Aug 9, 2005
    #2
    1. Advertising

  3. ---- 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.
     
    Dale Martenson, Aug 9, 2005
    #3
  4. Dale Martenson

    Chad Fowler Guest

    On 8/9/05, Dale Martenson <> 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!)
     
    Chad Fowler, Aug 10, 2005
    #4
  5. <!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=""
    type="cite">
    <pre wrap="">On 8/9/05, Dale Martenson <a class="moz-txt-link-rfc2396E" href="mailto:">&lt;&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>
     
    Dale Martenson, Aug 10, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tomás

    Gems -- #include <gems.hpp>

    Tomás, Mar 4, 2006, in forum: C++
    Replies:
    7
    Views:
    439
    Tomás
    Mar 5, 2006
  2. Lloyd Zusman
    Replies:
    3
    Views:
    198
    Lloyd Zusman
    Jun 21, 2005
  3. Dany Cayouette

    'private' gems/gems hierarchy

    Dany Cayouette, Nov 25, 2005, in forum: Ruby
    Replies:
    3
    Views:
    170
    Jim Weirich
    Nov 25, 2005
  4. Thaddeus L Olczyk

    Problem getting gems/listing gems. EINVAL

    Thaddeus L Olczyk, Aug 15, 2006, in forum: Ruby
    Replies:
    0
    Views:
    200
    Thaddeus L Olczyk
    Aug 15, 2006
  5. Patrick Hurley

    Creating binary gems, from source gems

    Patrick Hurley, Mar 4, 2007, in forum: Ruby
    Replies:
    0
    Views:
    147
    Patrick Hurley
    Mar 4, 2007
Loading...

Share This Page