# Log4r unpack problems

**URL:** <https://www.ruby-forum.com/t/log4r-unpack-problems/197117>\
**Category:** Ruby\
**Created:** [December 24, 2009, 1:05am UTC](https://www.ruby-forum.com/t/log4r-unpack-problems/197117 "2009-12-24T01:05:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e0b2c6/32.png) [@yoram](https://www.ruby-forum.com/u/yoram)\
**Post date:** [December 24, 2009, 1:05am UTC](https://www.ruby-forum.com/t/log4r-unpack-problems/197117/1 "2009-12-24T01:05:10Z")

</div>

I was just starting to use log4r and everything was going peachy until I  
tired to unpack it into my local vendor/gems. The next time I tried to  
load my rails environment, I got:

config.gem: Unpacked gem log4r-1.1.2 in vendor/gems has no specification  
file. Run ‘rake gems:refresh\_specs’ to fix this

and:

no such file to load – log4r

So - I dutifully tried running rake gems:refresh\_specs, only to get:

rake aborted!  
undefined method `installed\_source\_index’ for  
#Gem::SourceIndex:0x2b4a6fc

As a result, I was stuck. I could no longer load my environment.

After a lot of head scratching, a co-developer recommended renaming the  
‘src’ folder in the log4r gems dir to ‘lib’.

This magically works. I can now load my environment, although I still  
get that pesky message about the specification file missing.

Any suggestion sas to how to clean this up would be very much  
appreciated.

Yoram

---

<div class="post-metadata">

**Author:** ![yoram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e0b2c6/32.png) [@yoram](https://www.ruby-forum.com/u/yoram)\
**Post date:** [December 25, 2009, 4:38pm UTC](https://www.ruby-forum.com/t/log4r-unpack-problems/197117/2 "2009-12-25T16:38:26Z")

</div>

On Dec 23, 2009, at 5:05 PM, Yoram B. wrote:

> This magically works. I can now load my environment, although I still  
> get that pesky message about the specification file missing.
> 
> Any suggestion sas to how to clean this up would be very much  
> appreciated.

Log4r is no longer developed / supported. You should try the “logging”  
framework instead. It is not a direct replacement, but it is actively  
developed and supported.

> **[GitHub - TwP/logging: A flexible logging library for use in Ruby programs...](https://github.com/TwP/logging)**
>
> A flexible logging library for use in Ruby programs based on the design of Java's log4j library. - GitHub - TwP/logging: A flexible logging library for use in Ruby programs based on the design ...

Gems are available from gemcutter.

Blessings,  
TwP
