Dave Thomas wrote:
> For at least the last week, 1.9 HEAD has been unable to install gems.
> The problem seems to be with open-uri:
> 
> 
> irb(main):002:0> f = open("http://gems.rubyforge.org/yaml")
> NoMethodError: undefined method `[]=' for nil:NilClass
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:411:in
> `meta_add_field'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:326:in `block in
> open_http'
>     from /usr/local/rubybook/lib/ruby/1.9.0/net/http.rb:1297:in `block
> in each_header'
>     from /usr/local/rubybook/lib/ruby/1.9.0/net/http.rb:1296:in `each'
>     from /usr/local/rubybook/lib/ruby/1.9.0/net/http.rb:1296:in
> `each_header'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:326:in `open_http'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:735:in
> `buffer_open'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:197:in `block in
> open_loop'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:195:in `catch'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:195:in `open_loop'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:141:in `open_uri'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:637:in `open'
>     from /usr/local/rubybook/lib/ruby/1.9.0/open-uri.rb:33:in `open'
> 

I reported the same stack trace in "Re: Gem install error on head", but
it seems to be broken on any installation that does not already have a
sources cache, i.e. an empty --prefix directory.   It's been broken for
me for a while, as I always wipe my install directory before make install.

http://kurtstephens.com