Gems package manager

J

Jeffrey Moss

------=_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--
 
D

Dick Davies

* Jeffrey Moss said:
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.
 
M

Martijn Hoogendoorn

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

Dick Davies

* Martijn Hoogendoorn said:
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....
 
J

Jeffrey Moss

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" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Wednesday, January 26, 2005 3:36 PM
Subject: Re: Gems package manager
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top