2017-02-02 5 views
8

मैं RoR के साथ जाने की कोशिश कर रहा हूं। मैंने रुबी इंस्टालफेस्ट किया था, लेकिन मुझे लगता है कि जो openssl.bundle है, उसके साथ एक समस्या में भाग रहा हूं।रेल की ताजा स्थापना और ओपनएसएसएल त्रुटियां प्राप्त करना: "पहले से ही निरंतर ओपनएसएसएल प्रारंभ किया गया"

मैं RVM उपयोग कर रहा हूँ, और रेल 5.0.1 और रूबी 2.4.0 चला रहा हूँ

मैं rvm implode का उपयोग करके एक पूर्ण रूप से हटाना/नई शुरुआत करने की कोशिश की और के माध्यम से चला गया और निम्नलिखित सब कुछ RailsApps Guide पुनर्स्थापित लेकिन अभी भी समान दिखाई दे रहा है त्रुटि। मैं मैकोज सिएरा का नवीनतम संस्करण चला रहा हूं।

यह आउटपुट है जो मुझे my_app में $ Rake -T चलाते समय मिलता है।

[email protected]:~/workspace/myapp$ rake -T 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::VERSION 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_VERSION 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_LIBRARY_VERSION 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_VERSION_NUMBER 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::OPENSSL_FIPS 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::Config::DEFAULT_CONFIG_FILE 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::Signer 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::TEXT 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOCERTS 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOSIGS 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOCHAIN 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOINTERN 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOVERIFY 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::DETACHED 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::BINARY 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOATTR 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::PKCS7::NOSMIMECAP 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::ASN1::UNIVERSALSTRING 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::ASN1::CHARACTER_STRING 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16/openssl.bundle: warning: already initialized constant OpenSSL::ASN1::BMPSTRING 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/pkey.rb:8: warning: already initialized constant OpenSSL::PKey::DH::DEFAULT_1024 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/pkey.rb:8: warning: previous definition of DEFAULT_1024 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/pkey.rb:17: warning: already initialized constant OpenSSL::PKey::DH::DEFAULT_2048 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/pkey.rb:17: warning: previous definition of DEFAULT_2048 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/pkey.rb:30: warning: already initialized constant OpenSSL::PKey::DEFAULT_TMP_DH_CALLBACK 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/pkey.rb:30: warning: previous definition of DEFAULT_TMP_DH_CALLBACK was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::AES 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of AES was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::CAST5 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of CAST5 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::BF 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of BF was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::DES 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of DES was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::IDEA 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of IDEA was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::RC2 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of RC2 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::RC4 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of RC4 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:18: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:24: warning: already initialized constant OpenSSL::Cipher::RC5 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:24: warning: previous definition of RC5 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:28: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:33: warning: already initialized constant OpenSSL::Cipher::AES128 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:33: warning: previous definition of AES128 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:28: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:33: warning: already initialized constant OpenSSL::Cipher::AES192 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:33: warning: previous definition of AES192 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:28: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:33: warning: already initialized constant OpenSSL::Cipher::AES256 
/Users/richsmith/.rvm/gems/[email protected]/gems/openssl-2.0.3/lib/openssl/cipher.rb:33: warning: previous definition of AES256 was here 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:64: warning: constant OpenSSL::Cipher::Cipher is deprecated 
/Users/richsmith/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:64: warning: constant OpenSSL::Cipher::Cipher is deprecated 
rake aborted! 
TypeError: superclass mismatch for class Cipher 
/Users/richsmith/.rvm/gems/[email protected]/gems/activesupport-5.0.1/lib/active_support/key_generator.rb:2:in `require' 
/Users/richsmith/.rvm/gems/[email protected]/gems/activesupport-5.0.1/lib/active_support/key_generator.rb:2:in `<top (required)>' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails/application.rb:4:in `require' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails/application.rb:4:in `<top (required)>' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails.rb:11:in `require' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails.rb:11:in `<top (required)>' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails/all.rb:1:in `require' 
/Users/richsmith/.rvm/gems/[email protected]/gems/railties-5.0.1/lib/rails/all.rb:1:in `<top (required)>' 
/Users/richsmith/workspace/myapp/config/application.rb:3:in `require' 
/Users/richsmith/workspace/myapp/config/application.rb:3:in `<top (required)>' 
/Users/richsmith/workspace/myapp/Rakefile:4:in `require_relative' 
/Users/richsmith/workspace/myapp/Rakefile:4:in `<top (required)>' 
/Users/richsmith/.rvm/gems/[email protected]/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' 
(See full trace by running task with --trace) 

उत्तर

18

मणि स्थापना रद्द करें openssl -v 2.0.3

मणि स्थापित openssl -v 2.0.2

कि यह ठीक करना चाहिए।

+0

आप बिल्कुल सही थे। यह मुद्दा बनाम 2.0.3 से प्रतीत होता है लेकिन जब मैं एक संस्करण वापस चला गया, तो यह ठीक काम करता है। कोई विचार क्यों? – Rich

+0

वास्तव में, आपको फिर से openssl को पुनर्स्थापित करने की आवश्यकता नहीं है। openssl डिफ़ॉल्ट अंतर्निर्मित रत्नों में से एक है। –

+0

मेरे लिए भी काम किया! धन्यवाद! – jayp

5

इस 3 घंटे बाद हल किया गया। यह मुद्दा लॉग फाइलों में स्पष्ट था, ओपनएसएसएल के साथ कुछ मूर्खतापूर्ण हुआ।

समाधान था करने के लिए:

  1. $ \curl -L https://get.rvm.io | bash -s stable

  2. बंद का उपयोग कर इस मुद्दे के सभी निशान rvm implode

  3. वहां से मैं एक ताजा rvm की स्थापित किया निकालें और टर्मिनल फिर से खोल दी।

  4. स्थापित रूबी $ rvm install ruby-2.4.0
  5. मणि प्रबंधक $ gem update --system
  6. वैश्विक gemset में बदला गया $ rvm gemset use global
  7. सभी जवाहरात तब अद्यतन का उपयोग कर $ gem update
  8. यहाँ से मैं बंडलर और Nokogiri (यकीन नहीं स्थापित करता है, तो यह है का उपयोग कर अपडेट किया गया ओपनएसएसएल के लिए एक आश्रित लेकिन संभावना नहीं ले रहा था) $ gem install bundler और gem install nokogiri
  9. का उपयोग करके मैंनेका उपयोग करने में रेल स्थापित करने के लिए एक नया रत्न बनाया
  10. तब मैं $ gem install rails
  11. इस बिंदु पर जोखिम लेने के लिए इच्छुक नहीं का उपयोग कर रेल का नवीनतम संस्करण स्थापित है, मैं openssl gem uninstall openssl
  12. का उपयोग करके हटाया तो gem install openssl
  13. अन्त के साथ इसे पुनर्स्थापित, मैं अपने टर्मिनल बंद कर दिया, फिर से खोल दी यह और voila, यह काम किया!

मैं इसके लिए बहुत नया हूं इसलिए यहां निश्चित रूप से अनावश्यकताएं हो सकती हैं, लेकिन मुझे पता है कि इस समाधान ने सबकुछ साफ कर लिया है और काम किया है।

मणि 'openssl', '> = 2.0.3'

मेरी gemfile रहे हैं:

8

मैं लाइन जोड़कर इस हल किया।स्पष्ट रूप से बंडलर डिफ़ॉल्ट 2.0.2 संस्करण के साथ-साथ नया 2.0.3 संस्करण दोनों लोड कर रहा है। उपरोक्त रेखा इसे रोकती है।

+2

मैं आपका समाधान पसंद करता हूं। ओपनएसएसएल डाउनग्रेडिंग किसी और चीज से ज्यादा खतरनाक प्रतीत होता है। –

संबंधित मुद्दे