From: "Adam P." Date: 2010-12-15T17:12:06+09:00 Subject: Circular Require Warning by gsl and curb 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 :29: warning: loading in progress, circular require considered harmful - /usr/local/lib/ruby/1.9.1/rubygems.rb from goodtest.rb:1:in `
' from :29:in `require' from :32:in `rescue in require' from :217:in `try_activate' from :167:in `load_full_rubygems_library' from :29:in `require' from :29:in `require' from /usr/local/lib/ruby/1.9.1/rubygems.rb:1136:in `' 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 `' from :29:in `require' from :29:in `require' from /usr/local/lib/ruby/1.9.1/rubygems/doc_manager.rb:8:in `' from :29:in `require' from :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/.