[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

dev-utils gem... How do I require_gem 'dev-utils/debug' ?

Eirikur Hallgrimsson

10/9/2004 9:45:00 PM

I love the escape to irb idea and I have need of it. I'm new to gems,
and I have installed the dev-utils gem.

The dev-utils documentation shows a plain non-gem require, which
simply fails because the gem-installed version isn't in the path.

require_gem of 'dev-utils' works but does not supply the breakpoint
method, so I'm assuming that the debug functionality is not loaded.

require_gem of 'dev-utils/debug' fails.

gem list --local shows dev-utils, but not the subcomponents such as
debug.

?

Puzzled,

Eirikur





3 Answers

Jim Weirich

10/9/2004 11:43:00 PM

0

Eirikur Hallgrimsson wrote:
> I love the escape to irb idea and I have need of it. I'm new to gems,
> and I have installed the dev-utils gem.
>
> The dev-utils documentation shows a plain non-gem require, which
> simply fails because the gem-installed version isn't in the path.
>
> require_gem of 'dev-utils' works but does not supply the breakpoint
> method, so I'm assuming that the debug functionality is not loaded.
>
> require_gem of 'dev-utils/debug' fails.
>
> gem list --local shows dev-utils, but not the subcomponents such as
> debug.

Try this:

require 'rubygems' # Might not need this if already required
require_gem 'dev-utils' # This makes the gem available
# It also requires 'dev-utils'
# as a convenience
require 'dev-utils/debug' # Normal require now works
# because the gem is available

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


Eirikur Hallgrimsson

10/10/2004 2:30:00 AM

0

Jim Weirich's fix worked perfectly for me. Thanks, Jim!

--Eirikur

The fix:

require 'rubygems' # Might not need this if already required
require_gem 'dev-utils' # This makes the gem available
# It also requires 'dev-utils'
# as a convenience
require 'dev-utils/debug' # Normal require now works
# because the gem is available




Gavin Sinclair

10/10/2004 7:48:00 AM

0

On Sunday, October 10, 2004, 12:30:16 PM, Eirikur wrote:

> Jim Weirich's fix worked perfectly for me. Thanks, Jim!

> --Eirikur

> The fix:

> require 'rubygems' # Might not need this if already required
> require_gem 'dev-utils' # This makes the gem available
> # It also requires 'dev-utils'
> # as a convenience
> require 'dev-utils/debug' # Normal require now works
> # because the gem is available


Just for completeness, the middle step is unnecessary with RubyGems
0.8. And the comment about it is wrong: it doesn't require
'dev-utils' because the gem has no autorequire set.

Thanks for pointing out the difficulty; I'll see if I can modify the
docs in some helpful way.

Cheers,
Gavin