Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > dev-utils gem... How do I require_gem 'dev-utils/debug' ?

Reply
Thread Tools

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

 
 
Eirikur Hallgrimsson
Guest
Posts: n/a
 
      10-09-2004
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





 
Reply With Quote
 
 
 
 
Jim Weirich
Guest
Posts: n/a
 
      10-09-2004
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 http://onestepback.org
-----------------------------------------------------------------
"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)


 
Reply With Quote
 
 
 
 
Eirikur Hallgrimsson
Guest
Posts: n/a
 
      10-10-2004
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




 
Reply With Quote
 
Gavin Sinclair
Guest
Posts: n/a
 
      10-10-2004
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



 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
require_gem question Andrew Gibson Ruby 1 07-29-2006 02:02 AM
What is the point of require_gem in Ruby 1.8.2? Wes Gamble Ruby 3 03-23-2006 11:23 PM
Is there any relevant difference between require and require_gem? Lars Olsson Ruby 2 12-02-2005 02:29 PM
require vs require_gem Gavin Sinclair Ruby 2 06-18-2004 11:31 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57