简体   繁体   English

RVM红宝石安装失败

[英]RVM ruby installation fails

I've got an ruby error I can't manage to fix. 我遇到无法解决的红宝石错误。 To be short ruby isn't working as it should. 简而言之,红宝石无法正常工作。 When I try to reinstall it with 当我尝试用重新安装

rvm reinstall all --force

I get errors in the terminal, saying I should take a look at the .log files. 我在终端中收到错误消息,说我应该看一下.log文件。 Here is the content of the .log file: 这是.log文件的内容:

[2013-07-26 18:51:22] __rvm_with
Restoring gems to pristine condition...
bigdecimal-1.2.0 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
io-console-0.4.2 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
json-1.7.7 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
minitest-4.3.2 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
psych-2.0.0 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
rake-0.9.6 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
rdoc-4.0.0 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
test-unit-2.0.0.0 ERROR:  Loading command: pristine (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

'gem pristine bigdecimal --version 1.2.0 io-console --version 0.4.2 json --version 1.7.7 minitest --version 4.3.2 psych --version 2.0.0 rake --version 0.9.6 rdoc --version 4.0.0 test-unit --version 2.0.0.0' failed, you need to fix this gems manually.

I think the error appeared after installing the new xcode preview version but I'm not sure it has anything to do with that. 我认为错误是在安装新的xcode预览版之后出现的,但我不确定它与此有关。

I'm on a mac using 10.8.4 mountain lion. 我在Mac上使用10.8.4美洲狮。

Does someone know how to fix this? 有人知道如何解决这个问题吗? Thank you! 谢谢!

Update: 更新:

After re-installing ssl and entering the rvm reinstall command, there is an error again in the log file: 重新安装ssl并输入rvm reinstall命令后,日志文件中再次出现错误:

[2013-07-26 19:21:48] /Users/User/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
Exception `LoadError' at /Users/User/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1073 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /Users/User/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1082 - cannot load such file -- rubygems/defaults/ruby
Error loading RubyGems plugin "/Users/User/.rvm/gems/ruby-2.0.0-p0@global/gems/rubygems-bundler-1.2.0/lib/rubygems_plugin.rb": cannot load such file -- openssl (LoadError)
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:355: warning: already initialized constant Gem::Security::DIGEST_ALGORITHM
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:355: warning: previous definition of DIGEST_ALGORITHM was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:360: warning: already initialized constant Gem::Security::DIGEST_NAME
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:360: warning: previous definition of DIGEST_NAME was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:365: warning: already initialized constant Gem::Security::KEY_ALGORITHM
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:365: warning: previous definition of KEY_ALGORITHM was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:370: warning: already initialized constant Gem::Security::KEY_LENGTH
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:370: warning: previous definition of KEY_LENGTH was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:375: warning: already initialized constant Gem::Security::ONE_YEAR
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:375: warning: previous definition of ONE_YEAR was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:385: warning: already initialized constant Gem::Security::EXTENSIONS
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:385: warning: previous definition of EXTENSIONS was here
/Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require': cannot load such file -- openssl (LoadError)
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security/policy.rb:23:in `initialize'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security/policies.rb:6:in `new'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security/policies.rb:6:in `<module:Security>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security/policies.rb:1:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/security.rb:583:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/package.rb:43:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/installer.rb:8:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/request_set.rb:5:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems.rb:200:in `finish_resolve'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/rdoc.rb:14:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/uninstaller.rb:10:in `<top (required)>'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/commands/setup_command.rb:474:in `uninstall_old_gemcutter'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/commands/setup_command.rb:146:in `execute'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/command.rb:305:in `invoke_with_build_args'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/command_manager.rb:170:in `process_args'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/command_manager.rb:130:in `run'
    from /Users/User/.rvm/src/rubygems-2.0.6/lib/rubygems/gem_runner.rb:60:in `run'
    from setup.rb:45:in `<main>'
RubyGems 2.0.6 installed

Run these commands in sequence in terminal, and close all and open new terminal 在终端中依次运行这些命令,然后关闭所有并打开新终端

rvm get stable
rvm autolibs enable
rvm reinstall all --force

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM