ruby版本2.3.1
rvm版本1.29.7
电脑系统macOS Mojave 10.14.3
bogon:~ jinzesu$ gem install rails -v 5.0.0
ERROR:
While executing gem … (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources
升级gem也是同样的错误 gem update --system
bogon:~ jinzesu$ gem update --system
ERROR:
While executing gem … (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources
解决方案一:根据提示use non-HTTPS sources,使用http源
gem source -l
gem source -r https://rubygems.org/ to remove
gem source -a http://rubygems.org/ to read
解决方案二:根据require openssl, install OpenSSL,
升级Mac的:
openssl brew install openssl rvm reinstall 2.3.0 --with-openssl-dir=brew --prefix openssl
网友评论