Circular Require Warning by gsl and curb

A

Adam P.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,961
Messages
2,570,130
Members
46,689
Latest member
liammiller

Latest Threads

Top