is there a reason why saying require ‘net/http’ would return false?
i’ve been trying to figure out what’s wrong with my installation, but i
see no reason why it refuses to load that one library, it works for
everything else i can think of…
thanks
is there a reason why saying require ‘net/http’ would return false?
i’ve been trying to figure out what’s wrong with my installation, but i
see no reason why it refuses to load that one library, it works for
everything else i can think of…
thanks
False means that’s already required.
Diego Scataglini
On 7/5/07, Guest [email protected] wrote:
is there a reason why saying require ‘net/http’ would return false?
i’ve been trying to figure out what’s wrong with my installation, but i
see no reason why it refuses to load that one library, it works for
everything else i can think of…thanks
Usually, this is because it is already loaded …
irb(main):001:0> $LOADED_FEATURES.grep /net/
=> [“net/protocol.rb”, “net/http.rb”]
irb(main):002:0> require ‘net/http’ #already loaded, so should return
false
=> false
hth,
Todd
Nice one Todd,
I didn’t know about $LOADED_FEATURES.
Thanks
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs