尝试安装 Rails 时出现奇怪的错误

时间:2021-06-24 20:33:58

标签: ruby-on-rails ruby installation

Ruby 已安装

ruby -v
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin18]

并尝试运行命令

> sudo gem install rails


Error loading RubyGems plugin "/Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/executable-hooks-1.6.0/lib/rubygems_plugin.rb": dlopen(/Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle (LoadError)
Error loading RubyGems plugin "/Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": dlopen(/Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle (LoadError)
ERROR:  Loading command: install (LoadError)
    dlopen(/Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/myname/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

0 个答案:

没有答案