RubyGemsをアップデート

開発環境

  • 製品バージョン: NetBeans IDE Dev (Build 200809220201)
  • Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
  • システム: i386 上で動作する Mac OS X バージョン 10.5.5; UTF8; ja_JP (nb)
  • ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

更新失敗

NetBeansの「ツール」メニューから「Ruby Gems」を選択すると、
更新されているライブラリがあったのですべて更新すると更新が失敗してしまった。


Updating installed gems...
ERROR:  While executing gem ... (NameError)
    undefined local variable or method `ex' for #<Gem::SourceInfoCache:0x3052b4>


NetBeansRuby Gemsのダイアログには新しいバージョンをインストールするようにメッセージが表示されていた。

Warning: Old version of RubyGems detected: 1.0.1. Newer one should be installed.

ということでRubyGemsをアップデート

RubyGemsをアップデート

インストールされているバージョンを確認
$ gem --version
1.0.1
ターミナルからRubyGemsをアップデート
$ sudo gem update --system
Password:
Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.2.0
1 gem installed
Updating version of RubyGems to 1.2.0
Installing RubyGems 1.2.0
mkdir -p /Library/Ruby/Site/1.8
mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
mkdir -p /Library/Ruby/Site/1.8/rbconfig
install -c -m 0644 rbconfig/datadir.rb /Library/Ruby/Site/1.8/rbconfig/datadir.rb
 ・
 ・
 ・
 ・

	/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem

If `gem` was installed by a previous RubyGems installation, you may need
to remove it by hand.

RubyGems system software updated
バージョンを確認
$ gem --version
1.2.0

1.2.0に変わっている。

RubyGemsをアプデート後にNetBeansRubyGemsダイアログを確認

エラーメッセージは表示されたまま、NetBeansを再起動しても状況は変わらない。


この状態で試しに「すべてを更新」を実行してみると先程とは違うエラーになった。

Updating installed gems
HEAD 200 OK: http://gems.rubyforge.org/latest_specs.4.8
Updating RedCloth
Installing gem RedCloth-4.0.3
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/CHANGELOG
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/COPYING
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/README
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/Rakefile
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/bin/redcloth
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/basic.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/code.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/definitions.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/extra_whitespace.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/filter_html.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/filter_pba.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/helper.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/html.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/images.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/instiki.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/links.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/lists.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/poignant.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/sanitize_html.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/table.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/test_custom_tags.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/test_extensions.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/test_formatters.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/test_parser.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/test_restrictions.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/textism.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/threshold.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/test/validate_fixtures.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/case_sensitive_require/RedCloth.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/formatters/base.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/formatters/html.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/formatters/latex.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/formatters/latex_entities.yml
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/textile_doc.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth/version.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/lib/redcloth_scan.bundle
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/extras/mingw-rbconfig.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/extras/ragel_profiler.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth.h
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_attributes.c
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_inline.c
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_scan.c
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/extconf.rb
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_attributes.rl
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_common.rl
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_inline.rl
/Library/Ruby/Gems/1.8/gems/RedCloth-4.0.3/ext/redcloth_scan/redcloth_scan.rl
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/bin directory.

今日はここまで
現状のままでも問題ないので取りあえず保留