Rails 'rake gems:install' error in windows

I am developing with rails at three platform

mac, windows, linux.

until Rails 2.1, we can describe gem dependencies in environment.rb.

( this one ~

so I write environment.rb like below for using will_paginate

config.gem ‘capistrano’
config.gem ‘mislav-will_paginate’, :version => ‘~> 2.3.2’, :lib =>
‘will_paginate’, :source => ‘http://gems.github.com

after describing, in mac rails task is good result.

sudo rake gems:install

but Windows’s result is fail.

That is result.

C:\developments\eclipse\workspace_sdk\ZumpWeb>rake gems:install --trace
(in C:/developments/eclipse/workspace_sdk/ZumpWeb)
** Invoke gems:install (first_time)
** Invoke gems:base (first_time)
** Execute gems:base
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method collect' for nil:NilClass c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:237:in initialize’
c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:29:in new' c:/bin/ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb:29:in initialize’

I run not yet in linux.

Does anybody have same experience?

Sangmin Ryu wrote:

but Windows’s result is fail.

That is result.
undefined method `collect’ for nil:NilClass

I had the same problem and I discovered this blog post:


Basically, I was running an old version of gem. Do a “gem update