2013-03-19 6 views
9

के साथ परेशानी एक सहकर्मी के लिए एक नई मैकबुक स्थापित करने का प्रयास कर रही है। अच्छा नहीं चल रहा है।आरवीएम और ओपनएसएसएल

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 साथ गहरे लाल रंग का स्थापित करने का प्रयास ...

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. 

btw, मणि फ़ाइल कहते हैं, "स्रोत https://rubygems.org"

विचार:

सबसे पहले मैं OpenSSL स्थापित करें?

उत्तर

11

इस प्रयास करें:

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)] 
+2

एक स्पष्टीकरण टिप्पणी - "आरवीएम आवश्यकताएं चलाने" चलने से आपको गायब होमब्री सूत्रों का एक समूह मिल जाता है। प्रत्येक के लिए "ब्रू इंस्टॉल" चलाएं। –

2

तो यह मेरे लिए काम किया:

rvm pkg install openssl 
rvm reinstall all --force 

मैं भी ReadLine समर्थन के लिए rvm autolibs rvm_pkg था।

10

ओपी वास्तव में मेरे दिन को बचाया! मेरे मामले में:

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

openssl संस्करण: 1.0.2k

यह मेरे लिए काम किया:

brew reinstall openssl 
5

पर MacOS 10.12.2 काढ़ा के माध्यम से openssl स्थापित करने, काम नहीं करेगा। इसे ठीक करने के लिए, चलाएं:

export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/lib/pkgconfig 

और फिर आरबीएम के माध्यम से रूबी इंस्टॉल करें।

संपादित करें: समस्या के पीछे कारण के बारे में अधिक जानकारी here

+0

रूबी के पुराने संस्करणों के लिए यह और भी महत्वपूर्ण है जो openssl के नए संस्करणों के साथ ठीक से काम नहीं कर सकता है उदा। 1.1। यह सेटिंग आरवीएम काम के '--with-openssl-dir' विकल्प बनाने के लिए आवश्यक है। – mastaBlasta

0

यह अच्छी तरह से ArchLinux wiki पर वर्णित है:

रूबी संस्करण बड़े 2.4 से OpenSSL 1.0 की आवश्यकता होती है लेकिन RVM उन्हें OpenSSL 1.1 के साथ निर्माण करने के लिए कोशिश करेंगे।

तो तुम (सबसे आसान) कर सकते हैं:

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

आप ArchLinux wiki के बारे में अधिक समाधान देख सकते हैं।