# Require system

**URL:** <https://www.ruby-forum.com/t/require-system/142063>\
**Category:** Ruby\
**Created:** [July 3, 2008, 4:14am UTC](https://www.ruby-forum.com/t/require-system/142063 "2008-07-03T04:14:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [July 3, 2008, 4:14am UTC](https://www.ruby-forum.com/t/require-system/142063/1 "2008-07-03T04:14:25Z")

</div>

Was thinking about the way libraries are required, and the potential  
for load conflicts. Of course, if anyone has ever run into it this I’m  
sure they worked around it ASAP, but I think it’s good take a look at  
these potential scenarios.

What if someone created a project with their own version of smtp.rb,  
and in their project the path they used was lib/net/smtp.rb. After  
installing via setup.rb, we find that some of our other programs are  
no longer working. Why? Because they use:

require ‘net/stmp’

but are no longer loading the built-in ruby library b/c site\_ruby  
occurs first in the load path, and this new “net/stmp.rb” appears  
there.

OTOH, if we installed via RubyGems, and do the same, our other  
programs still work, but our new lib isn’t accessible b/c Gems first  
attempts to load via Ruby’s normal #require method. However, if one  
activates the gem, eg. gem ‘foonet’ (or whatever the gem may be  
called), then we may again run into issues if another lib also being  
used depends on the core lib.

This could occur for any core or standard lib, or between 3rd party  
libs for that matter.

T.
