ruby 加载 RubyGems 插件时出错,openssl.bundle (LoadError)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20092600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error loading RubyGems plugin ,openssl.bundle (LoadError)
提问by icemelon
I am new to ruby. When I type any thing related to gem, error below will happen. why causes it and how to solve the problem? Thanks!
我是红宝石的新手。当我输入任何与 gem 相关的内容时,会发生以下错误。为什么会导致它以及如何解决问题?谢谢!
Error loading RubyGems plugin "/Users/chiang/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb": dlopen(/Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle, 9): Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle
Reason: image not found - /Users/chiang/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle (LoadError)
回答by Bijendra
Things to verify...
需要验证的东西...
- How did you install rvm
- hit
rvm notesand check if it's installed properly ruby -v, check for the version of ruby present
- 你是怎么安装rvm的
- 点击
rvm notes并检查它是否安装正确 ruby -v, 检查当前的 ruby 版本
If you find any issues here, uninstall rvm using rvm implodeand also remove ruby. Refer to the rvm installation guidefor the use of this command.
如果您在这里发现任何问题,请使用卸载 rvmrvm implode并删除 ruby。该命令的使用参考rvm安装指南。
\curl -L https://get.rvm.io | bash -s stable --ruby
ORyou can try the other way without removing the present rvm installation.
或者您可以在不删除当前 rvm 安装的情况下尝试另一种方式。
rvm get stable
rvm reinstall 2.0.0
Hope this helps.
希望这可以帮助。
回答by singh1469
The following worked for me.
以下对我有用。
brew rm openssl
brew cleanup openssl
brew install openssl
rvm reinstall ruby
Apparently brew updateor brew upgradebreaks the Ruby runtime which is what caused the error for me.
显然brew update或brew upgrade破坏了 Ruby 运行时,这是导致我出错的原因。
回答by Alter Lagos
To whoever having this problem with rbenv, I solved it reinstalling openssl and upgrading rbenv, then reinstalling ruby:
对于遇到此问题的人rbenv,我通过重新安装 openssl 并升级 rbenv,然后重新安装 ruby 解决了这个问题:
brew reinstall openssl
brew upgrade ruby-build rbenv
rbenv install 2.2.10 # or whatever version you're using it

