# Packaging libraries inside a program?

**URL:** <https://www.ruby-forum.com/t/packaging-libraries-inside-a-program/189776>\
**Category:** Ruby-Gnome 2\
**Created:** [June 7, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/packaging-libraries-inside-a-program/189776 "2010-06-07T16:43:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Shearn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@Alexander\_Shearn](https://www.ruby-forum.com/u/Alexander_Shearn)\
**Post date:** [June 7, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/packaging-libraries-inside-a-program/189776/1 "2010-06-07T16:43:54Z")

</div>

Hey all,

tl;dr - would it be possible to package up glib, gtk, and pango, for  
installation somewhere with no root access?

A friend and I have written a ruby program designed for use at uni: we  
have  
a cascading learning scheme where knowledgeable users can help out  
people  
who are stuck. You can specify which topics you know about (eg, second  
year  
courses, python, ruby, etc), and anyone who has a question about one can  
come over and talk to you when you’re in the labs.

We wrote a simple program to allow people to find Cascaders easily,  
which  
installs and runs nicely on the uni systems.

However, this was a cli interface, which still scares a few people. I’ve  
just finished a working GUI for the program, however, it obviously  
requires  
ruby-gnome2, which is not installed by default on the uni lab systems.

Here’s the question:  
Would it be possible to install and package the glib, gtk, and pango  
sub-libraries into my program as extra libraries, so the gui can run  
without  
requiring root access to install it?

Any help appreciated!

many thanks,  
shearn89

---

<div class="post-metadata">

**Author:** ![Alexander\_Shearn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@Alexander\_Shearn](https://www.ruby-forum.com/u/Alexander_Shearn)\
**Post date:** [June 7, 2010, 5:04pm UTC](https://www.ruby-forum.com/t/packaging-libraries-inside-a-program/189776/2 "2010-06-07T17:04:24Z")

</div>

Yes. You can put all the libraries in a directory and then  
set the environment variable LD\_LIBRARY\_PATH to  
include that directory. If you set the environment variable  
before you require gtk2 you can probably even do it  
all from the ruby script.

```
 MikeC
```

---

<div class="post-metadata">

**Author:** ![Alexander\_Shearn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@Alexander\_Shearn](https://www.ruby-forum.com/u/Alexander_Shearn)\
**Post date:** [June 7, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/packaging-libraries-inside-a-program/189776/3 "2010-06-07T17:10:50Z")

</div>

ah, awesome! Can i just use the libraries from my system, or do I need  
to  
rebuild them as a user with different permissions or something?
