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 ~
http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies
)

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:ininitialize’
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:ininitialize’
c:/bin/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:104:in
`new’
c:/bin/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails

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:

http://rails.lighthouseapp.com/projects/8994/tickets/462-loading-environment-fails-with-an-outdated-version-of-rubygems-while-using-config-gem-some_gem

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs