# Using libraries in shoes

**URL:** <https://www.ruby-forum.com/t/using-libraries-in-shoes/177068>\
**Category:** Ruby\
**Created:** [October 10, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/using-libraries-in-shoes/177068 "2009-10-10T20:24:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hicks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@Simon\_Hicks](https://www.ruby-forum.com/u/Simon_Hicks)\
**Post date:** [October 10, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/using-libraries-in-shoes/177068/1 "2009-10-10T20:24:45Z")

</div>

Hi all,

I’ve been playing around with Shoes and although I understand all the  
examples I can find in online tutorials, I’m struggling to get it to  
do anything useful… The problem is I can’t seem to use require with  
any of my own libraries.

I’ve tried copying the ruby source files into ‘~/Applications/Shoes/  
Contents/MacOS/ruby/lib’ and ‘~/Applications/Shoes/Contents/MacOS/  
lib’ but in both cases it says ‘no such file to load…’.

I’ve got gems working in Shoes and I’ve used my own libraries outside  
of Shoes without any problems.

What am I doing wrong?

thanks in advance for your help,

Simon

---

<div class="post-metadata">

**Author:** ![Simon\_Hicks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@Simon\_Hicks](https://www.ruby-forum.com/u/Simon_Hicks)\
**Post date:** [October 11, 2009, 12:18am UTC](https://www.ruby-forum.com/t/using-libraries-in-shoes/177068/2 "2009-10-11T00:18:52Z")

</div>

> I’ve got gems working in Shoes and I’ve used my own libraries outside  
> of Shoes without any problems.
> 
> What am I doing wrong?

I haven’t ever tried it, but I think I read once somewhere that to use  
gems within shoes you have to copy [i.e. gem unpack] a copy of the gem  
to your code’s directory, and require it from there.  
GL!  
-r

---

<div class="post-metadata">

**Author:** ![Simon\_Hicks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@Simon\_Hicks](https://www.ruby-forum.com/u/Simon_Hicks)\
**Post date:** [October 11, 2009, 6:06am UTC](https://www.ruby-forum.com/t/using-libraries-in-shoes/177068/3 "2009-10-11T06:06:34Z")

</div>

Gems are no problem… the problem is when I want to require a library  
that I’ve written myself. For example, I’ve written a gmail class,  
that allows a script to send me an email when it’s finished a task or  
whatever… It’s a simple class that is contained in a single .rb  
document, which I end up using in most of the scripts I write for my  
own use. Since it’s not in gem form I can’t include it in anything  
that uses shoes!
