On Jul 23, 2008, at 09:29 AM, ara.t.howard wrote:
> On Jul 22, 2008, at 11:57 PM, Eric Hodel wrote:
>> Yes, in 1.1.0
>
> hrm - what's wrong with this then
>
> cfp:/tmp > mkdir -p ./gems/1.8/gems/ && cp -r `gemdir arrayfields` ./ 
> gems/1.8/gems/

Use `gem install`, there is no ./gems/1.8/specifications/, so RubyGems  
will not see any gems.

> cfp:/tmp > GEM_PATH=./gems/1.8/ ruby -r rubygems -e' p Gem.path '
> ["./gems/1.8/", "/opt/local/lib/ruby/gems/1.8"]

To double-check your work, 1.2 will show the repository the gem is  
found in:

GEM_PATH=./gems/1.8 gem list -d arrayfields

Here's what I did:

$ sudo gem install arrayfields --no-rdoc --no-ri
Successfully installed arrayfields-4.6.0
1 gem installed

$ rm -fr ~/tmp/gems

$ gem install arrayfields -i ~/tmp/gems --no-rdoc --no-ri
Successfully installed arrayfields-4.6.0
1 gem installed

$ echo 'raise "foobar"' >> ~/tmp/gems/gems/arrayfields-4.6.0/lib/ 
arrayfields.rb

$ ruby !$
ruby ~/tmp/gems/gems/arrayfields-4.6.0/lib/arrayfields.rb
/Users/drbrain/tmp/gems/gems/arrayfields-4.6.0/lib/arrayfields.rb:436:  
foobar (RuntimeError)

$ GEM_PATH=~/tmp/gems gem env path
/Users/drbrain/tmp/gems:/Library/Ruby/Gems/1.8

$ GEM_PATH=~/tmp/gems gem list -d array

*** LOCAL GEMS ***

arrayfields (4.6.0)
     Author: Ara T. Howard
     Homepage: http://codeforpeople.com/lib/ruby/arrayfields/
     Installed at: /Users/drbrain/tmp/gems

     arrayfields

$ GEM_PATH=~/tmp/gems ruby -rubygems -e 'require "arrayfields"'
/Users/drbrain/tmp/gems/gems/arrayfields-4.6.0/lib/arrayfields.rb:436:  
foobar (RuntimeError)
	from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:32:in  
`gem_original_require'
	from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:32:in `require'
	from -e:1