# Ubuntu and Log4r

**URL:** <https://www.ruby-forum.com/t/ubuntu-and-log4r/69404>\
**Category:** Ruby\
**Created:** [September 20, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/ubuntu-and-log4r/69404 "2006-09-20T21:01:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [September 20, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/ubuntu-and-log4r/69404/1 "2006-09-20T21:01:40Z")

</div>

Hi Forum.

Not sure where this issue belongs… but anyhow: My Log4r ain’t working

1 . I installed ruby-1.8.5 from source in /usr/src. (based on some blog  
recomendation…)  
2. I installed rybygems-0.8.11 in /usr/src/

Both are working - I did a ‘sudo gem install log4r’ and the package  
installed itself.

3 . But using Log4r inside my ruby scripts is NOT working.

When I search for the Log4r files, I find them in  
/usr/local/lib/ruby/gems/1.8/gems/log4r-1.0.5/

And from here I do not know how to proceed? I haven’t been arond linux  
in years … :-/ Anyone want to help me?

/jansenh

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [September 20, 2006, 10:15pm UTC](https://www.ruby-forum.com/t/ubuntu-and-log4r/69404/2 "2006-09-20T22:15:57Z")

</div>

jansenh wrote:

> When I search for the Log4r files, I find them in  
> /usr/local/lib/ruby/gems/1.8/gems/log4r-1.0.5/

Ubuntu shares with Mandriva an idiotic “–prefix bug”. Not sure if the  
bug’s  
on the Ruby side or the Linux side. Heres’ the workaround:

$ ll /usr/local/lib/ruby  
lrwxrwxrwx 1 root root 13 Sep 13 20:13 /usr/local/lib/ruby -\>  
/usr/lib/ruby/

I just used ln -s to link the one folder to the other.

BTW Ubuntu had so many other Ruby problems I switched to Mandriva. For,  
uh,  
less of them. 😉

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [September 21, 2006, 1:56am UTC](https://www.ruby-forum.com/t/ubuntu-and-log4r/69404/3 "2006-09-21T01:56:17Z")

</div>

Phlip wrote:

> /usr/lib/ruby/
> 
> I just used ln -s to link the one folder to the other.
> 
> BTW Ubuntu had so many other Ruby problems I switched to Mandriva. For, uh,  
> less of them. 😉

configure and build and install ruby with --prefix=/usr  
then rm /usr/bin/ruby  
then ln -s /usr/bin/ruby-1.8 /usr/bin/ruby

then install gems  
then use gems to install whatever gems you need.

---

<div class="post-metadata">

**Author:** ![jansenh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@jansenh](https://www.ruby-forum.com/u/jansenh)\
**Post date:** [September 21, 2006, 5:40am UTC](https://www.ruby-forum.com/t/ubuntu-and-log4r/69404/4 "2006-09-21T05:40:34Z")

</div>

Reid T. wrote:

> configure and build and install ruby with --prefix=/usr

Are you implying one passes the --prefix argument to all three of the  
configure, make, and make install commands?
