Help: could not do gems installation

I am on windows xp. I also have netbeans installed which has ruby
support.

Installation of gems through netbeans works okay. But the GUI does not
show me some of the gems I wanted to install. So I tried

           gem install activerecord-sqlserver-adapter

which gives me the following message

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
    Bad file descriptor - connect(2)(Errno::EBADF)

I am behind a firewall so I tried -p option too. I get a different
error

            gem install activerecord-sqlserver-adapter -p

ERROR: While executing gem ... (NoMethodError)
    undefined method `[]=' for #<Gem::ConfigFile:0x2d5dd68>

Netbeans website suggested the following alternative.

           jruby -S gem install activerecord-sqlserver-adapter

This returns similar errors.

I am not an expert rubyist. And I am not sure how to get activerecord-
sqlserver-adapter installed. Any help is greatly appreciated.

Thank you for your time,
Ragu