Rails gem precedence

Hi folks

I am dev’ing a gem from a Github fork and I want to integration test
my changes in my Rails project.

Previously I had been able to copy the gem into vendor/gems to ensure
this took precedence over the locally installed gem.

I can’t see why this is no longer the case or how to investigate how
Rails will resolve the gems - is there some kinda cache?

I guess my alternative is to build and install the gem locally from my
edited fork but it seemed easier just to copy it to vendor/gems.

Thoughts/comments welcome.

Matt

portaputer:speechbox matt$ rake gems
(in /Volumes/data/dev/speechbox)
Type ‘svnversion --help’ for usage.
[F] haml
[ ] rcov
[F] mislav-will_paginate
[I] msp-youtube-g

I = Installed
F = Frozen
portaputer:speechbox matt$ ll vendor/gems/
total 0
drwxr-xr-x 12 matt matt 408 Jun 24 11:55 mislav-
will_paginate-2.3.2/
drwxr-xr-x 13 matt matt 442 Jun 27 15:33 haml-2.0.0/
drwxr-xr-x 13 matt matt 442 Jul 11 10:42 msp-youtube-g/
portaputer:speechbox matt$ cat config/environment.rb | grep config.gem
config.gem “haml”
config.gem “rcov”
config.gem “mislav-will_paginate”, :lib => “will_paginate”, :source
=> “http://gems.github.com/
config.gem “msp-youtube-g”, :lib => “youtube_g”, :source => “http://
gems.github.com/
portaputer:speechbox matt$

OK, to answer my own Q…

It seems that Rails has to “know” the Gem has been unpacked. I am not
sure where it keeps this state but unless you have issued a rake gems:unpack GEM=mygem' previously, andrake gems’ shows mygem as
frozen then the contents of vendor/gems/mygem will be ignored…

Your frozen gem isn’t being detect because the directory name is missing
the version. Rails is trying to match a
msp-youtube-g-* directory that doesn’t exist.

Tiago M.