Circular Require Warning by gsl and curb

Discussion in 'Ruby' started by Adam P., Dec 15, 2010.

  1. Adam P.

    Adam P. Guest

    I have spent some time googling for answers to this and I have checked
    this forum's archives for hints. I am either using the wrong terms or
    not understanding what I am reading. Here is what happened:

    I am playing around to find out how to download from finance.google.com,
    parse the results and then do a linear regression.

    I found curb, csv and gsl (rb-gsl that is) to be the gems required.

    As I started to develop some code I first required curb, ran the code
    with -w flag and all was fine, no warnings.

    I developed the parser, required csv and ran code with -w flag and all
    was fine, no warnings.

    I had to install gsl and rb-gsl gem, which was a hassle, as I first
    installed gsl excluding shared libraries (as the INSTALL document for
    Mac OS X would state) but that turned out to prevent gem install gsl
    from going through. After I reinstalled gsl without any ./configure
    options, gem install gsl went through smoothly.

    But once I ran my code again with the -w flag suddenly the following
    warnings appear:


    $ ruby -w goodtest.rb
    <internal:lib/rubygems/custom_require>:29: warning: loading in progress,
    circular require considered harmful -
    /usr/local/lib/ruby/1.9.1/rubygems.rb
    from goodtest.rb:1:in `<main>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:32:in `rescue in require'
    from <internal:gem_prelude>:217:in `try_activate'
    from <internal:gem_prelude>:167:in `load_full_rubygems_library'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/local/lib/ruby/1.9.1/rubygems.rb:1136:in `<top (required)>'
    from /usr/local/lib/ruby/1.9.1/rubygems.rb:968:in `load_plugins'
    from /usr/local/lib/ruby/1.9.1/rubygems.rb:968:in `each'
    from /usr/local/lib/ruby/1.9.1/rubygems.rb:976:in `block in
    load_plugins'
    from /usr/local/lib/ruby/1.9.1/rubygems.rb:976:in `load'
    from
    /usr/local/lib/ruby/gems/1.9.1/gems/yard-0.6.3/lib/rubygems_plugin.rb:2:in
    `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/local/lib/ruby/1.9.1/rubygems/doc_manager.rb:8:in `<top
    (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    lib/complex.rb is deprecated

    I commented out all requires (require "curb", require "csv", require
    "gsl") and then re-added them one by one. "csv" did not trigger the
    warning, but curb and gsl did.

    I have seen circular requires been discussed as bugs, but since I did
    not have them before my troublesome install of gsl and rb-gsl I am not
    sure whether this is a bug or whether I am doing something wrong.

    Any help would be much appreciated.

    --
    Posted via http://www.ruby-forum.com/.
    Adam P., Dec 15, 2010
    #1
    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. Kiuhnm
    Replies:
    16
    Views:
    738
    Jonathan Mcdougall
    Jan 3, 2005
  2. Ross Bamford

    [ANN] Curb 0.0.2 released

    Ross Bamford, Nov 24, 2006, in forum: Ruby
    Replies:
    0
    Views:
    84
    Ross Bamford
    Nov 24, 2006
  3. Ross Bamford

    [ANN] Curb 0.0.6 - Post and Cookies

    Ross Bamford, Dec 8, 2006, in forum: Ruby
    Replies:
    0
    Views:
    97
    Ross Bamford
    Dec 8, 2006
  4. Shadowfirebird

    circular 'require'

    Shadowfirebird, Jul 23, 2008, in forum: Ruby
    Replies:
    28
    Views:
    345
    Shadowfirebird
    Jul 24, 2008
  5. Julian Mehnle
    Replies:
    17
    Views:
    867
    Julian Mehnle
    May 18, 2006
Loading...

Share This Page