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

Discussion in 'Ruby' started by Eirikur Hallgrimsson, Oct 9, 2004.

  1. 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
     
    Eirikur Hallgrimsson, Oct 9, 2004
    #1
    1. Advertising

  2. Eirikur Hallgrimsson

    Jim Weirich Guest

    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)
     
    Jim Weirich, Oct 10, 2004
    #2
    1. Advertising

  3. 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
     
    Eirikur Hallgrimsson, Oct 10, 2004
    #3
  4. 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
     
    Gavin Sinclair, Oct 10, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. arm developer
    Replies:
    0
    Views:
    365
    arm developer
    Jun 3, 2004
  2. Gavin Sinclair

    [ANN] dev-utils v1.0

    Gavin Sinclair, Oct 7, 2004, in forum: Ruby
    Replies:
    14
    Views:
    244
    Mauricio Fernández
    Oct 11, 2004
  3. Austin 7873
    Replies:
    5
    Views:
    198
    Eric Hodel
    Jan 27, 2007
  4. Dennis Crissman

    require_gem vs. gem

    Dennis Crissman, May 23, 2007, in forum: Ruby
    Replies:
    12
    Views:
    184
    Abder-Rahman Ali
    Sep 7, 2010
  5. Hazel Crato
    Replies:
    3
    Views:
    139
    Hazel Crato
    Jun 11, 2008
Loading...

Share This Page