Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Gems package manager

Reply
Thread Tools

Gems package manager

 
 
Jeffrey Moss
Guest
Posts: n/a
 
      01-26-2005
------=_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--


 
Reply With Quote
 
 
 
 
Dick Davies
Guest
Posts: n/a
 
      01-26-2005
* Jeffrey Moss <(E-Mail Removed)> [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/ruby...ets/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


 
Reply With Quote
 
 
 
 
Martijn Hoogendoorn
Guest
Posts: n/a
 
      01-26-2005
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.


 
Reply With Quote
 
Dick Davies
Guest
Posts: n/a
 
      01-26-2005
* Martijn Hoogendoorn <(E-Mail Removed)> [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/ruby...quirehack.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


 
Reply With Quote
 
Dick Davies
Guest
Posts: n/a
 
      01-26-2005
* Dick Davies <(E-Mail Removed)> [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/w...ckIntroduction
^^^^^^^^^^^^^^^^^^^

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


 
Reply With Quote
 
Jeffrey Moss
Guest
Posts: n/a
 
      01-26-2005
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" <(E-Mail Removed)>
To: "ruby-talk ML" <(E-Mail Removed)>
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.
>




 
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
Gems -- #include <gems.hpp> Tomás C++ 7 03-05-2006 02:48 PM
Confusion about gems and non-gems working together. Lloyd Zusman Ruby 3 06-20-2005 11:23 PM



Advertisments