views:

102

answers:

3

For some reason when I try to do config.gem include for this particular gem package it always says its missing. I tried gem 'xapian-fu' and that works just fine! I am sure its not multi gem repository issue as I use the environment in regular basis and has no problem about this.

+5  A: 

OK turns out I figured out the answer myself :P

config.gem 'xapian-fu', :lib=>'xapian_fu'

The problem seems because the lib file is being named with the underscore while the gem itself is named with hyphen.

goodwill
+2  A: 

Glad you figured out the issue, there is a good Railscast about Gem Dependencies that covers the whole config.gem setup in depth.

One additional thing, I'd highly recommend explicitly setting the gem version number you want installed as otherwise you're risking pulling a newer version of a gem that may have compatibility issues.

Mike Buckbee
yeah agree, I am just playing around it for now, when I do something serious I would definitely lock it.
goodwill
A: 

I wrote xapian-fu and this naming inconsistency is a bug, sorry!

It's fixed in the latest version, so you don't need to specify the :lib option any more (the library is now available as both xapian_fu and xapian-fu).

John Leach