[Rubygems-developers] require_gem 'extensions/string' b0rked
gsinclair at soyabean.com.au
Fri Sep 3 19:07:25 EDT 2004
Yeah, I guess so. So instead of my code looking like this:
require_gem 'extensions/string', '> 0.2'
It will look like this?
require 'extensions/string', '> 0.2'
My concern now: what if a package is both site-ruby installed and gem
installed? If a version is specified, as above, then I guess only gem
directories will be searched. If _no_ version is specified, though,
then I imagine the site-ruby install will win out every time? That
would suck if it were a really old version. This is a small
complaint, I know.
The above code samples represent a good step forward, though:
'require' is more appealing than 'require_gem', especially in terms of
syntax highlighting :)
Based on this direction of RubyGems, we should include a command
'rgwhich', that tells you where software is installed.
On Saturday, September 4, 2004, 1:39:49 AM, Richard wrote:
> Since we are using require, I will add the function to optionally pass the
> version number for evaluation as a second parameter to require. The issue
> here is that extensions/string is jamming together two namespaces. The first
> is the 'rubygems' gem name, the second assumes that you have the gem name in
> your lib dir and then the second part (string) under that. I would rather
> keep the namespace of the file being required separate from the gem name
> even if convention has folks create a mirrored naming structure. Does that
> make sense?
> On 9/3/04 11:08 AM, "Gavin Sinclair" <gsinclair at soyabean.com.au> wrote:
>> What about versioning?
>> require_gem 'extensions/string', '> 0.2'
>> I don't think require_gem is dead yet, and I'd like to retain that
>> shortcut when using it.
>> On Saturday, September 4, 2004, 12:48:05 AM, Richard wrote:
>>> Actually, the point is that you don't need to do require_gem '...path'. If
>>> you do require_gem then you just load the gem, otherwise just use require
>>> and it will load the gem for you. You now have access to all files in all
>>> paths, and require_gem is handled automatically.
>>> On 9/3/04 10:35 AM, "Gavin Sinclair"
>>> <gsinclair at soyabean.com.au> wrote:
>>>> A while ago I modified 'require_gem' so that
>>>> require_gem 'extensions/string'
>>>> is equivalent to
>>>> require_gem 'extensions'
>>>> require 'extensions/string'
>>>> In the recent reshuffle of require_gem, this functionality has been
>>>> lost, UIMM.
>>>> Anyone mind if I reimplement it?
>>>> Rubygems-developers mailing list
>>>> Rubygems-developers at rubyforge.org
>> Rubygems-developers mailing list
>> Rubygems-developers at rubyforge.org
More information about the Rubygems-developers