0

我已经完成rvm remove了 Ruby,但宝石仍然存在:

$ rvm remove ruby-1.8.7-head
Removing /Users/agrimm/.rvm/src/ruby-1.8.7-head...
Removing /Users/agrimm/.rvm/rubies/ruby-1.8.7-head...
Removing ruby-1.8.7-head aliases...
Removing ruby-1.8.7-head wrappers...
Removing ruby-1.8.7-head environments...
Removing ruby-1.8.7-head binaries...

$ ls /Users/agrimm/.rvm/gems | grep 1.8.7
ruby-1.8.7-head
ruby-1.8.7-head@global

我这样做是因为我想进行一次失败的 gem 安装尝试,但是传统的尝试失败了:

$ gem install pkg/laser-0.7.0.pre2.gem 
Fetching: ripper-plus-1.3.0.gem (100%)
Fetching: axiom_of_choice-1.0.0.gem (100%)
Fetching: stream-0.5.gem (100%)
Fetching: object_regex-1.0.1.gem (100%)
Fetching: trollop-1.16.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ripper-plus-1.3.0
Successfully installed axiom_of_choice-1.0.0
Successfully installed stream-0.5
Successfully installed object_regex-1.0.1
Successfully installed trollop-1.16.2
Successfully installed laser-0.7.0.pre2
6 gems installed
dyld: lazy symbol binding failed: Symbol not found: _capi_get_constant
  Referenced from: /Users/agrimm/.rvm/gems/ruby-1.8.7-head/gems/json-1.7.1/lib/json/ext/parser.bundle
  Expected in: flat namespace

dyld: Symbol not found: _capi_get_constant
  Referenced from: /Users/agrimm/.rvm/gems/ruby-1.8.7-head/gems/json-1.7.1/lib/json/ext/parser.bundle
  Expected in: flat namespace

f8-1e-df-dc-3b-2a:laser agrimm$ gem install pkg/laser-0.7.0.pre2.gem 
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x1046be400> 0.5"]
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x1046be400> 0.5"]
Building native extensions.  This could take a while...
Successfully installed laser-0.7.0.pre2
1 gem installed
dyld: lazy symbol binding failed: Symbol not found: _capi_get_constant
  Referenced from: /Users/agrimm/.rvm/gems/ruby-1.8.7-head/gems/json-1.7.1/lib/json/ext/parser.bundle
  Expected in: flat namespace

dyld: Symbol not found: _capi_get_constant
  Referenced from: /Users/agrimm/.rvm/gems/ruby-1.8.7-head/gems/json-1.7.1/lib/json/ext/parser.bundle
  Expected in: flat namespace

$ gem list laser
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]

*** LOCAL GEMS ***

Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]

$ gem uninstall laser
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]
ERROR:  While executing gem ... (Gem::InstallError)
    cannot uninstall, check `gem list -d laser`

$ gem list -d laser
Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]

*** LOCAL GEMS ***

Invalid gemspec in [/Users/agrimm/.rvm/gems/ruby-1.8.7-head/specifications/laser-0.7.0.pre2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x104eb6838> 0.5"]

$
4

1 回答 1

3

如果您还想删除 gemsets(和 gems),请在删除 Ruby 时添加--gems标志。Ruby 已经消失了,看来您必须手动完成。

于 2012-06-02T05:20:00.073 回答