35

同僚のために新しいMacBookをセットアップしようとしています。うまくいかない。

まず、OpenSSLをインストールします。

Heathers-MacBook-Pro:~ heather$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/heather/.rvm/archives
######################################################################## 100.0%
Extracting openssl to /Users/heather/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/heather/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/heather/.rvm/src/openssl-1.0.1c.
Installing openssl to /Users/heather/.rvm/usr

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

Updating openssl certificates

次に、opensslを使用してrubyをインストールしようとします...

Heathers-MacBook-Pro:website heather$ rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
Fetching yaml-0.1.4.tar.gz to /Users/heather/.rvm/archives
Extracting yaml to /Users/heather/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/heather/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/heather/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/heather/.rvm/usr
Installing Ruby from source to: /Users/heather/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
ruby-1.9.3-p392 - #extracting ruby-1.9.3-p392 to /Users/heather/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #extracted to /Users/heather/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #configuring
ruby-1.9.3-p392 - #compiling
ruby-1.9.3-p392 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.25 for ruby-1.9.3-p392 ...
Installation of rubygems completed successfully.
Saving wrappers to '/Users/heather/.rvm/bin'.
ruby-1.9.3-p392 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p392 - #importing default gemsets, this may take time ...
Install of ruby-1.9.3-p392 - #complete 

Heathers-MacBook-Pro:website heather$ bundle update
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for
compiling with OpenSSL using RVM are available at rvm.io/packages/openssl.

ところで、gemファイルには「sourcehttps://rubygems.org」と書かれてます

アイデア?

4

12 に答える 12

20

これを試して:

rvm get head
rvm pkg remove
rvm requirements run  # if brew gives you warnings about formulas to install, run "brew install" for each before moving on.

rvm reinstall [the version you need (i.e: 2.0.0)]
于 2013-03-19T23:03:07.910 に答える
19

ArchLinux wikiでよく説明されています:

2.4 より古い Ruby バージョンには OpenSSL 1.0 が必要ですが、RVM は OpenSSL 1.1 でビルドしようとします。

だからあなたはすることができます(最も簡単です):

$ rvm pkg install openssl
$ rvm reinstall 2.3.5 --with-openssl-dir=$HOME/.rvm/usr

ArchLinux wikiでさらに多くのソリューションを見ることができます。

于 2017-09-23T09:55:02.457 に答える
6

Mac Mojave 上の RVM 経由で openssl 1.1 および Ruby 2.3 に問題がある場合は、次のコマンドを試すことができます。問題は、Ruby 2.3 が openssl 1.1 と互換性がないことです。

rvm pkg install openssl
PKG_CONFIG_PATH=$HOME/.rvm/usr/lib/pkgconfig rvm reinstall 2.3.3 --with-openssl-dir=$HOME/.rvm/usr
于 2019-11-30T12:31:47.987 に答える
4

だからこれは私のために働いた:

rvm pkg install openssl
rvm reinstall all --force

rvm autolibs rvm_pkgreadline のサポートもありました。

于 2016-10-20T21:56:48.380 に答える
2

openssl バージョン: 1.0.2k

これは私のために働いた:

brew reinstall openssl
于 2017-03-24T12:14:40.903 に答える