Gems package manager

Discussion in 'Ruby' started by Jeffrey Moss, Jan 26, 2005.

  1. Jeffrey Moss

    Jeffrey Moss Guest

    ------=_NextPart_000_06F6_01C503B9.65423CC0
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable

    I have a few suggestions for the rubygems package manager

    If you have to use require_gem to load your library, it aught to have a =
    config option to download the most recent version automatically as your =
    script is executing. That would make it 10x more useful to me.

    There should also be a config option to create symbolic links (or =
    shortcuts) to the most recently installed packages in the site_ruby =
    directory when you install a gem, so that you can skip the require_gem =
    and instead just require directly from site_ruby. Maybe the gems command =
    can switch your default version around (replace the symlink). I would =
    prefer to have that flexibility there also.

    -Jeff
    ------=_NextPart_000_06F6_01C503B9.65423CC0--
    Jeffrey Moss, Jan 26, 2005
    #1
    1. Advertising

  2. Jeffrey Moss

    Dick Davies Guest

    * Jeffrey Moss <> [0112 22:12]:
    > I have a few suggestions for the rubygems package manager
    >
    > If you have to use require_gem to load your library, it aught to have a config option to download the most recent version automatically as your script is executing. That would make it 10x more useful to me.


    How much easier does this make your life? 10x ? I can't see how to be honest.
    Off the top of me head:

    * a change in the API in the more recent version would break your code
    * would unit tests also trigger this auto-download?
    * are you always running ruby as root?
    ( if yes, are you happy downloading code off the net to run as root?
    if no, are you going to give each user their own gem directory?
    )
    * is the network always available?
    * wouldn't you rather know what version of someone elses code you're running?

    > There should also be a config option to create symbolic links (or shortcuts) to the most recently installed packages in the site_ruby directory when you install a gem, so that you can skip the require_gem and instead just require directly from site_ruby. Maybe the gems command can switch your default version around (replace the symlink). I would prefer to have that flexibility there also.


    If you :

    a) "require 'ubygems'"
    b) add a '-rubygems' to your command line
    or
    c) set RUBYOPT='rubygems' in your environment

    you can use require and it defaults to the latest gem.

    See

    http://onestepback.org/articles/rubygemsfacets/index.html

    for more blurb.

    Both these ideas were discussed at length back in the mists of time
    when rubygems was young ( last summer ) - see the rubygems list archives.

    --
    'Bender, Ship, stop arguing or I'll come back there and change
    your opinions manually.'
    -- Leela
    Rasputin :: Jack of All Trades - Master of Nuns
    Dick Davies, Jan 26, 2005
    #2
    1. Advertising

  3. Op woensdag 26 januari 2005 23:12, schreef Jeffrey Moss:
    > If you have to use require_gem to load your library, it aught to have a
    > config option to download the most recent version automatically as your
    > script is executing. That would make it 10x more useful to me.

    Most programs are not run with sufficient priviliges to write in the
    system-wide Ruby directory. Perhaps if you could install gems per user,
    without the need to install Ruby in your home directory.

    > There should also be a config option to create symbolic links (or
    > shortcuts) to the most recently installed packages in the site_ruby
    > directory when you install a gem, so that you can skip the require_gem and
    > instead just require directly from site_ruby.

    As of RubyGems 0.7.0 by default a stub is installed, so you can just use:

    require 'somelib'

    instead of:

    require 'rubygems'
    require_gem 'somelib'

    However, only when using require_gem can you request a specific version, as
    in:

    require_gem 'somelib', '>= 0.1.0'

    met vriendelijke groet,
    Martijn Hoogendoorn.
    Martijn Hoogendoorn, Jan 26, 2005
    #3
  4. Jeffrey Moss

    Dick Davies Guest

    * Martijn Hoogendoorn <> [0137 22:37]:
    > As of RubyGems 0.7.0 by default a stub is installed, so you can just use:
    >
    > require 'somelib'


    Stubs are sooo 0.7.0'y ....
    (they got taken out in 0.8.something)

    http://onestepback.org/articles/rubygemsfacets/stubsvsrequirehack.html

    To be honest I tried rubygems circa 0.5.0 and gave up because I couldn't
    figure out how to get native gems to build. Seems like it's the standard now, so
    I need to get it back on my todo list.

    Does anyone have some up-to-date docs on rubygems?
    The wiki doesn't seem to be maintained....

    --
    'If we can hit that bull's-eye, the rest of the dominoes will fall like a
    house of cards... Checkmate!'
    -- Zapp. Brannigan
    Rasputin :: Jack of All Trades - Master of Nuns
    Dick Davies, Jan 26, 2005
    #4
  5. Jeffrey Moss

    Dick Davies Guest

    * Dick Davies <> [0144 22:44]:

    > Does anyone have some up-to-date docs on rubygems?
    > The wiki doesn't seem to be maintained....


    Let me take that back ... had one of the older pages on
    the wiki bookmarked; the url should have given me a clue

    http://rubygems.rubyforge.org/wiki/wiki.pl?OldCommandInterface/QuickIntroduction
    ^^^^^^^^^^^^^^^^^^^

    doh.
    (this is what i get for running firefox with the fullscreen extension...)


    --
    'common sense is what tells you that the world is flat.'
    -- Principia Discordia
    Rasputin :: Jack of All Trades - Master of Nuns
    Dick Davies, Jan 26, 2005
    #5
  6. Jeffrey Moss

    Jeffrey Moss Guest

    Thanks for the info, I will set my environment like you suggested Dick.

    However...

    I still think configuration options for automatically installing packages,
    whether in the users home directory, the site wide gems directory or a
    special webserver directory, would be extremely useful. I was saying it
    would make the app more useful Dick, not my life (which is easy enough
    already!)

    -Jeff

    ----- Original Message -----
    From: "Martijn Hoogendoorn" <>
    To: "ruby-talk ML" <>
    Sent: Wednesday, January 26, 2005 3:36 PM
    Subject: Re: Gems package manager


    > Op woensdag 26 januari 2005 23:12, schreef Jeffrey Moss:
    >> If you have to use require_gem to load your library, it aught to have a
    >> config option to download the most recent version automatically as your
    >> script is executing. That would make it 10x more useful to me.

    > Most programs are not run with sufficient priviliges to write in the
    > system-wide Ruby directory. Perhaps if you could install gems per user,
    > without the need to install Ruby in your home directory.
    >
    >> There should also be a config option to create symbolic links (or
    >> shortcuts) to the most recently installed packages in the site_ruby
    >> directory when you install a gem, so that you can skip the require_gem
    >> and
    >> instead just require directly from site_ruby.

    > As of RubyGems 0.7.0 by default a stub is installed, so you can just use:
    >
    > require 'somelib'
    >
    > instead of:
    >
    > require 'rubygems'
    > require_gem 'somelib'
    >
    > However, only when using require_gem can you request a specific version,
    > as
    > in:
    >
    > require_gem 'somelib', '>= 0.1.0'
    >
    > met vriendelijke groet,
    > Martijn Hoogendoorn.
    >
    Jeffrey Moss, Jan 26, 2005
    #6
    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:
    420
    Tomás
    Mar 5, 2006
  2. Lloyd Zusman
    Replies:
    3
    Views:
    181
    Lloyd Zusman
    Jun 21, 2005
  3. Dany Cayouette

    'private' gems/gems hierarchy

    Dany Cayouette, Nov 25, 2005, in forum: Ruby
    Replies:
    3
    Views:
    155
    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:
    188
    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:
    133
    Patrick Hurley
    Mar 4, 2007
Loading...

Share This Page