# Creating a gem which installs files outside /usr/lib/ruby

**URL:** <https://www.ruby-forum.com/t/creating-a-gem-which-installs-files-outside-usr-lib-ruby/151136>\
**Category:** Ruby\
**Created:** [October 17, 2008, 9:34am UTC](https://www.ruby-forum.com/t/creating-a-gem-which-installs-files-outside-usr-lib-ruby/151136 "2008-10-17T09:34:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crocco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@crocco](https://www.ruby-forum.com/u/crocco)\
**Post date:** [October 17, 2008, 9:34am UTC](https://www.ruby-forum.com/t/creating-a-gem-which-installs-files-outside-usr-lib-ruby/151136/1 "2008-10-17T09:34:50Z")

</div>

I want to create a gem for an application written using the ruby KDE  
bindings.  
It’s the first time I create a gem, but I think I more or less  
understand what  
I should do. The only issue I’m having is that, KDE expects to find some  
files  
(in particular, the program icon and the program .desktop file) in some  
specific directory (namely, in one of the directories listed in the  
KDEDIRS  
environment variables, which usually means something like /usr/,  
/usr/local  
and /usr/kde). Is there a way to tell rubygems to install something  
outside  
the /usr/lib/ruby directory tree? According to the documentation at  
[http://docs.rubygems.org](http://docs.rubygems.org), rubygems can be told to install binaries in  
/usr/bin, but there’s nothing about doing the same for other kind of  
files (at  
least, I couldn’t find it), so I guess the answer is no.

By the way, the documentation at [http://docs.rubygems.org](http://docs.rubygems.org) seems quite  
outdated  
(at least, the Gemspec reference page says it’s last been generated in  
2005).  
Does anybody know whether more recent documentation can be found?

Thanks in advance

Stefano
