# Rails Initialization - where to put requires?

**URL:** <https://www.ruby-forum.com/t/rails-initialization-where-to-put-requires/140670>\
**Category:** Rails\
**Created:** [June 17, 2008, 11:03am UTC](https://www.ruby-forum.com/t/rails-initialization-where-to-put-requires/140670 "2008-06-17T11:03:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Grijalva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@Dave\_Grijalva](https://www.ruby-forum.com/u/Dave_Grijalva)\
**Post date:** [June 17, 2008, 11:03am UTC](https://www.ruby-forum.com/t/rails-initialization-where-to-put-requires/140670/1 "2008-06-17T11:03:36Z")

</div>

While upgrading my app to use Rails 2.1, the clean place to put my gem  
requires makes my non-gem requires stand out as needing a place to  
live. Where is the best place to put requires of either libs from my  
app (in the lib directory) or standard libs (such as digest/md5)?  
Right now, I have a huge paragraph of these requires just before my  
Rails::Initializer.run.

It seems like maybe I should create an initializer for these. What is  
the standard wisdom here?

---

<div class="post-metadata">

**Author:** ![Dave\_Grijalva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@Dave\_Grijalva](https://www.ruby-forum.com/u/Dave_Grijalva)\
**Post date:** [June 17, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/rails-initialization-where-to-put-requires/140670/2 "2008-06-17T23:47:34Z")

</div>

You can create a myrequires.rb in config/initializers and put all your  
require in there, I guess. there’s nothing magical about the name  
myrequires.rb, btw. I chose it because it’s unlikely to conflict with  
something else.
