# Using gems from vendor/?

**URL:** <https://www.ruby-forum.com/t/using-gems-from-vendor/89240>\
**Category:** Rails\
**Created:** [January 4, 2006, 3:13am UTC](https://www.ruby-forum.com/t/using-gems-from-vendor/89240 "2006-01-04T03:13:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamil\_Kisiel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ee59a6/32.png) [@Kamil\_Kisiel](https://www.ruby-forum.com/u/Kamil_Kisiel)\
**Post date:** [January 4, 2006, 3:13am UTC](https://www.ruby-forum.com/t/using-gems-from-vendor/89240/1 "2006-01-04T03:13:01Z")

</div>

Maybe someone here can help me out. I’ve unpacked tzinfo in to my  
vendor/ directory using “gem unpack tzinfo” and got a  
vendor/tzinfo-0.1.1 directory as a result. How can I require this gem in  
my app? I’m trying to use a require line in my environment.rb but no  
matter what I do Rails seems to look for a locally installed copy in  
/usr/local/ instead. Any advice?

---

<div class="post-metadata">

**Author:** ![Kamil\_Kisiel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ee59a6/32.png) [@Kamil\_Kisiel](https://www.ruby-forum.com/u/Kamil_Kisiel)\
**Post date:** [January 4, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/using-gems-from-vendor/89240/2 "2006-01-04T18:12:34Z")

</div>

Kamil Kisiel wrote:

> Maybe someone here can help me out. I’ve unpacked tzinfo in to my  
> vendor/ directory using “gem unpack tzinfo” and got a  
> vendor/tzinfo-0.1.1 directory as a result. How can I require this gem in  
> my app? I’m trying to use a require line in my environment.rb but no  
> matter what I do Rails seems to look for a locally installed copy in  
> /usr/local/ instead. Any advice?

Require isn’t working because the tzinfo.rb file in tzinfo-0.1.1/lib  
doesn’t add its directory to the load path at the moment. I’ll look at  
making a change to do this in a future release.

For now, you can add tzinfo-0.1.1/lib to the load path manually using  
config.load\_paths in environment.rb:

config.load\_paths += %W( #{RAILS\_ROOT}/vendor/tzinfo-0.1.1/lib )

You should then be able to require ‘tzinfo’ and have it load the copy  
from vendor.

Phil

–  
Philip R.  
[http://tzinfo.rubyforge.org/](http://tzinfo.rubyforge.org/) – DST-aware timezone library for Ruby

---

<div class="post-metadata">

**Author:** ![Kamil\_Kisiel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ee59a6/32.png) [@Kamil\_Kisiel](https://www.ruby-forum.com/u/Kamil_Kisiel)\
**Post date:** [January 4, 2006, 9:45pm UTC](https://www.ruby-forum.com/t/using-gems-from-vendor/89240/3 "2006-01-04T21:45:54Z")

</div>

Philip R. wrote:

> Require isn’t working because the tzinfo.rb file in tzinfo-0.1.1/lib
> 
> Phil

Thanks Philip, I’ll give this a try. Maybe you could also include this  
information on the website as well? It would probably help save some  
others from similar frustration 🙂

Kamil
