Loading a gem when gem name and the library name are different

2 views
Skip to first unread message

massive

unread,
Jan 27, 2009, 6:42:05 AM1/27/09
to merb
There seems to be a problem with loading a gem when gem's name differs
from library name. This problem occurs with compass gem installed from
github.

Gem's name is compass, but it is installed from github as
chriseppstein-compass. Merb won't load it regardless of the name used.
Below is my error report to Compass mailing list. (http://
groups.google.com/group/compass-users/browse_thread/thread/
f048de069ad435aa). Compass' author didn't know how to solve the
problem.

Is there any way to fix this other than using 'require' instead of
'depency'?

----

At least for me, even if I install compass with gem, Merb (1.0.8.1)
will crash when starting it.
Merb will crash with both names:

FATAL: The gem compass (>= 0, runtime), [] was not found

and

FATAL: The file chriseppstein-compass was not found

even though it is installed to the system

gem list --local | grep compass
chriseppstein-compass (0.3.8, 0.3.7)

The way I fixed this (for now at least) was to replace
dependency "chriseppstein-compass"
with
require "compass"
in dependencies.rb

Justin Smestad

unread,
Jan 27, 2009, 12:30:48 PM1/27/09
to me...@googlegroups.com
dependency "chriseppstein-compass", "1.0.0", :require_as => 'compass'
Reply all
Reply to author
Forward
0 new messages