On Dec 23, 11:41 pm, Yoram Bernet <[email protected]> wrote:
> I was just starting to use log4r and everything was going peachy until I
> tired to unpack it into my local vendor/gems.

Let me guess - you used a bare "gem unpack" command to do this, right?
Not going to work...

> 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.

To start, rm -rf the mess in vendor/gems/log4r-1.1.2. A quick look at
log4r shows that it's not going to work without the .specification
file, as it uses a nonstandard location (src/) for it's source files.
Renaming src/ to lib/ worked (for suitably small values of "work")
because the default location that's assumed for doing a 'require' on a
gem is lib/<gem_name>.rb.

After tidying up, go ahead and run "rake gems:unpack", which should
*correctly* unpack the gem into vendor/gems.

Note that any "require" statements referring to log4r before it's
loaded (ie, in environment.rb or environments/*.rb) WILL FAIL in
strange ways, as the gem loader will be trying to grab log4r from the
system repository instead of vendor/gems.

Hope this helps!

--Matt Jones


>
> Yoram
> --
> Posted viahttp://www.ruby-forum.com/.

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to