トップ «前の日記(2007-11-01) 最新 次の日記(2007-11-07)» 編集

3 日坊主日記


2007-11-03 [長年日記]

_ update できない gem name をよける

gem update したら rmagick がひっかかる。

C:\arc>gem update
Updating installed gems...
Attempting remote update of rmagick
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

ruby gem_extconf.rb update

sh configure

gem_extconf.rb:38: undefined method `exitstatus' for nil:NilClass (NoMethodError)


Gem files will remain installed in c:/gems/1.8/gems/rmagick-1.15.10 for inspection.
Results logged to c:/gems/1.8/gems/rmagick-1.15.10/gem_make.out

C:\arc>

そもそも update が途中で止まってしまうはよくないと思うけど、 とりあえずよけるオプションを付けてみた。

diff -ur rubygems-0.9.4\lib\rubygems\commands\update_command.rb c:\ruby-1.8.5\lib\ruby\site_ruby\1.8\rubygems\commands\update_command.rb
--- rubygems-0.9.4\lib\rubygems\commands\update_command.rb	Fri May 11 04:01:44 2007
+++ c:\ruby-1.8.5\lib\ruby\site_ruby\1.8\rubygems\commands\update_command.rb	Sat Nov 03 01:37:59 2007
@@ -19,6 +19,10 @@
           'Update the RubyGems system software') do |value, options|
           options[:system] = value
         end
+        add_option('--except GEMNAME',
+          'gem name excepted from update') do |value, options|
+          options[:except] = value
+        end
       end

       def defaults_str
@@ -52,6 +56,7 @@
                           else
                             options[:args]
                           end
+        gems_to_update.delete options[:except] if options[:except]
         options[:domain] = :remote # install from remote source
         install_command = command_manager['install']
         gems_to_update.uniq.sort.each do |name|
@@ -99,4 +104,4 @@
       end
     end
   end
-end
\ No newline at end of file
+end

まだ ruby-1.8.5 です。すみません。

C:\arc>gem update --except rmagick

できた。

[]