From: Luis Lavena Date: 2007-11-24T04:05:09+09:00 Subject: Re: 'gem update' making wrong choice On Nov 23, 2:19 pm, Michel Demazure wrote: > Luis Lavena wrote: > > On Nov 23, 9:48 am, Michel Demazure wrote: > >> I work on a Win box, without compiler. > >> But 'gem environment' gives two PLATFORMs, win32 *and* ruby. > >> Then 'gem update' try to load the wrong gem... > > >> How may I clean the environment variable ? > >> Thanks for help... > > > I don't think understand your problem. > > > gem env reports two platforms: that is correct: take for example this > > linux box: > > > RubyGems Environment: > > - RUBYGEMS VERSION: 0.9.5 (0.9.5) > > - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] > > - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8 > > - RUBY EXECUTABLE: /usr/local/bin/ruby > > - RUBYGEMS PLATFORMS: > > - ruby > > - x86-linux > > - GEM PATHS: > > - /usr/local/lib/ruby/gems/1.8 > > > That means rubygems will try to install gems marked with 'ruby' (also > > known as pure ruby gems) or gems that are pre-compiled / binary or > > specific for the x86 linux platform. > > > In your case, x86-mswin32 is a correct platform and RubyGems will try > > to install the best gems for you. > > > What is the output you're having? > > More information will be helpful to point directions or bug reports. > > @Luis > Apparently, 'gem install' selects the wrong gem and loads a gem to be > compiled, see below : > This is new to gem 0.9.5, before I had to choose... > Yes Michel, this was reported and solved for gems marked as 'mswin32' platform which extend to mongrel, rcov and others. This problem was discussed on RubyGems development list and this was fixed in the repository. I guess RubyGems developers are waiting for more feedback until drop 0.9.5.1 bugfix release. I'll suggest checkout the repository trunk of RubyGems [1] and perform the install manually. I must agree this should have rolled sooner, but catching all the odd cases with so many platforms is a hard task. Also, this is a mistake that gem developers used 'mswin32' instead of using Gem::Platform::CURRENT (almost all, including me). You can overide that for the time being with: gem update --platform 'mswin32' Maybe now 0.9.5 is out, we should start creating _correct_ packages for it? [1] http://rubyforge.org/scm/?group_id=126