ruby 版本是 2.3.0,mac os x 是 10.13.6
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin17]
$ gem install rails -v 3.2.16
ERROR: Loading command: install (LoadError)
cannot load such file -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
执行 gem install rails -v 3.2.16,安装 rails 出现 openssl 问题, 参考了一下https://ruby-china.org/topics/8966的解决方案, 尝试安装 openssl
$ brew install openssl
Warning: [email protected] 1.1.1g is already installed and up-to-date
To reinstall 1.1.1g, run `brew reinstall [email protected]`
已经是最新的 openssl,继续尝试 rvm pkg install openssl 给出如下错误
$ brew install openssl
Beware, 'rvm pkg ...' is deprecated, read about the new autolibs feature: 'rvm help autolibs'.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Fetching openssl-1.0.1i.tar.gz to /Users/alan/.rvm/archives
Extracting openssl to /Users/alan/.rvm/src/openssl-1.0.1i.....
Configuring openssl in /Users/alan/.rvm/src/openssl-1.0.1i.....................-
Compiling openssl in /Users/alan/.rvm/src/openssl-1.0.1i.......................|
Installing openssl to /Users/alan/.rvm/usr.....................................-
Error running '__rvm_make install',
please read /Users/alan/.rvm/log/1589712289/openssl_make.install.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates.......
继续尝试 rvm reinstall all 命令后还是错误,请问这个是什么问题?
也尝试过重新安装 ruby,出现
Error running 'env GEM_HOME=/Users/alan/.rvm/gems/ruby-2.3.0@global GEM_PATH= /Users/alan/.rvm/rubies/ruby-2.3.0/bin/ruby -d /Users/alan/.rvm/src/rubygems-3.0.8/setup.rb --no-document',
please read /Users/alan/.rvm/log/1589713192_ruby-2.3.0/rubygems.install.log