2017-02-15 3 views
2

OSX(10.12.3)を実行していてRubyがインストールされています(2.2.2)がうまくいきました。 RVMを使用して2.2.6にアップグレードしようとしています。インストールがうまくいくようです。Ruby 2.2.6をインストールしているときにMacOS SierraにRVM問題があります

- rvm install 2.2.6 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.12/x86_64/ruby-2.2.6. 
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. 
Checking requirements for osx. 
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. 
Requirements installation successful. 
Installing Ruby from source to: /location/.rvm/rubies/ruby-2.2.6, this may take a while depending on your cpu(s)... 
ruby-2.2.6 - #downloading ruby-2.2.6, this may take a while depending on your connection... 
ruby-2.2.6 - #extracting ruby-2.2.6 to /location/.rvm/src/ruby-2.2.6.... 
ruby-2.2.6 - #configuring.......................................................... 
ruby-2.2.6 - #post-configuration. 
ruby-2.2.6 - #compiling........................................................... 
ruby-2.2.6 - #installing.......... 
ruby-2.2.6 - #making binaries executable.. 
ruby-2.2.6 - #downloading rubygems-2.6.10 
ruby-2.2.6 - #extracting rubygems-2.6.10..... 
ruby-2.2.6 - #removing old rubygems......... 
$LANG was empty, setting up LANG=en_US, if it fails again try setting LANG to something sane and try again. 
ruby-2.2.6 - #installing rubygems-2.6.10..................... 
ruby-2.2.6 - #gemset created /location/.rvm/gems/[email protected] 
ruby-2.2.6 - #importing gemset /location/.rvm/gemsets/global.gems................................................ 
ruby-2.2.6 - #generating global wrappers........ 
ruby-2.2.6 - #gemset created /location/.rvm/gems/ruby-2.2.6 
ruby-2.2.6 - #importing gemsetfile /location/.rvm/gemsets/default.gems evaluated to empty gem list 
ruby-2.2.6 - #generating default wrappers........ 
ruby-2.2.6 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). 
Install of ruby-2.2.6 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri 

しかし、私はコマンドを実行しようとすると、いくつかのエラーが発生します。

- bundle 
-bash: bundle: command not found 
    - gem install bundler 
ERROR: While executing gem ... (Gem::Exception) 
    Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources  

インストールがうまくいくようですが、インストールするときにopensslを要求することはできません。ここで何が問題になるのでしょうか?どうすれば修正できますか?

答えて

0

私は全体のRVMをパージしようとしましたが、クリーンな再インストールは役に立たなかった。 hereからphqの答えを使って、私はそれを動作させることができました。

rvm remove 2.2.6 
rvm pkg install openssl 
rvm install 2.2.6 --with-openssl-dir=$HOME/.rvm/usr 
gem install bundler 
bundle 

それは手動でOpenSSLをロードするように、それはおそらく最善の解決策ではないのですが、現在、私の作品唯一の解決策であるように思われます。

1

まだHomebrewがインストールされていない場合は、先に試してみてください。彼らが言っているように、「自作ではAppleが必要としなかったものをインストールする」というのはあなたの場合はopensslだ。

  1. は自作をインストールします。/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. は、OpenSSLをインストールします。brew install openssl
  3. 再びバンドラをインストールしてください:gem install bundler

将来の問題を回避するために、私はあなたがRVM Autolibsを見てみましょうお勧めします。 Homebrewまたは他のマネージャーを使用して必要な依存関係を自動的にインストールします。ドキュメントを読んでいない場合は、rvm autolibs enable && rvm autolibs packages && rvm autolibs homebrewを実行すれば問題ありません。

+0

私はHomebrewを使用しており、その時点でOpenSSLがインストールされていました。また、私はautolibsを(デフォルトで)有効にしていましたが、autosslを適切に構成しなかったという問題があるようでした(私の答えから分かるように)。 – mpartan

関連する問題