2017-05-03 12 views
9

इस प्रश्न को स्टैक ओवरफ्लो और अन्य मंचों पर दो बार पूछा गया है, लेकिन मुझे लगता है कि मुझे यह त्रुटि पारित नहीं हो रही है। जब मैं capistrano production deploy चलाता हूं, तो मुझे यह त्रुटि तैनाती प्रक्रिया के हिस्से के रूप में मिलती है।जेसन-वी 1.8.6 कैपिस्ट्रानो तैनाती के हिस्से के रूप में स्थापित नहीं होगा

cap production bundler:install 
00:00 bundler:install 
     01 bundle install --path /var/local/blackduck_flock_rails/shared/bundle --without development test --deployme… 
     01 An error occurred while installing json (1.8.6), and Bundler cannot continue. 
     01 Make sure that `gem install json -v '1.8.6'` succeeds before bundling. 
(Backtrace restricted to imported tasks) 
cap aborted! 


SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 5 
bundle stdout: An error occurred while installing json (1.8.6), and Bundler cannot continue. 
Make sure that `gem install json -v '1.8.6'` succeeds before bundling. 
bundle stderr: Nothing written 


Tasks: TOP => bundler:install 
(See full trace by running task with --trace) 

मैं अपने log/capistrano.log फ़ाइल पर एक नज़र डाली और यहाँ प्रासंगिक सामग्री है कि मैं मुसीबत शूट करने के लिए देख रहा था कर रहे हैं।

# Logfile created on 2017-05-03 14:42:16 -0400 by logger.rb/54072 


INFO --------------------------------------------------------------------------- 
    INFO START 2017-05-03 14:42:16 -0400 cap production bundler:install 
    INFO --------------------------------------------------------------------------- 
DEBUG [ec1d281e] Running if test ! -d /var/local/blackduck_flock_rails/current; then echo "Directory does not exist '/var/local/blackduck_flock_rails/current'" 1>&2; false; fi as [email protected] 
DEBUG [ec1d281e] Command: if test ! -d /var/local/blackduck_flock_rails/current; then echo "Directory does not exist '/var/local/blackduck_flock_rails/current'" 1>&2; false; fi 
DEBUG [ec1d281e] Finished in 0.328 seconds with exit status 0 (successful). 
DEBUG [4f633904] Running /usr/bin/env bundle check --path /var/local/blackduck_flock_rails/shared/bundle as [email protected] 
DEBUG [4f633904] Command: cd /var/local/blackduck_flock_rails/current && /usr/bin/env bundle check --path /var/local/blackduck_flock_rails/shared/bundle 
DEBUG [4f633904] Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 
DEBUG [4f633904] The following gems are missing 
* json (1.8.6) 
* tzinfo (1.2.2) 
* activesupport (4.2.6) 

etc. etc.......... 


DEBUG [4f633904] * uglifier (3.0.4) 

DEBUG [4f633904] Install missing gems with `bundle install` 
DEBUG [4f633904] Finished in 0.179 seconds with exit status 1 (failed). 
    INFO [6c99e662] Running /usr/bin/env bundle install --path /var/local/blackduck_flock_rails/shared/bundle --without development test --deployment --quiet as [email protected] 
DEBUG [6c99e662] Command: cd /var/local/blackduck_flock_rails/current && /usr/bin/env bundle install --path /var/local/blackduck_flock_rails/shared/bundle --without development test --deployment --quiet 
DEBUG [6c99e662] An error occurred while installing json (1.8.6), and Bundler cannot continue. 
Make sure that `gem install json -v '1.8.6'` succeeds before bundling. 

तो पहली बात नोट करने के लिए। लॉग मुझे बता रहा है कि बंडलर का चल रहा संस्करण पुराना है और मुझे नवीनतम स्थापित करना चाहिए। यहां वह है जो मुझे समझ में नहीं आता है। मेरी विकासशील मशीन पर, मेरे पास Bundler version 1.14.6 है। लक्ष्यीकरण सर्वर पर जिसे मैं तैनात करने की कोशिश कर रहा हूं, मेरे पास Bundler version 1.14.6 भी है। मैंने दोनों मशीनों पर इसकी पुष्टि की है और वे वास्तव में वही हैं। दूसरा, मेरे पास विकासशील मशीन और लक्ष्य मशीन दोनों के लिए एक ही रूबी संस्करण हैं। रूबी संस्करण 2.2.5 है।

दूसरा, जब मैं लक्ष्य सर्वर पर gem list चलाता हूं, तो मैं देख सकता हूं कि json 1.8.6 स्थापित है।

json (1.8.3, 1.8.1) 

क्या देता है?

अंत में, समस्या इस निर्देशिका में लक्ष्य मशीन /var/local/blackduck_flock_rails/shared/bundle पर होना चाहिए। bundle निर्देशिका के अंदर, मेरे पास ruby फ़ोल्डर है जिसमें 1.9.1 और 2.2.0 है। क्या यह समस्या का स्रोत हो सकता है। मैं इस पर फंस गया हूं और ऐसा लगता है कि इन तरह के प्रश्न हमेशा किसी की मशीन पर विशिष्ट कुछ से संबंधित होते हैं जो आवश्यक रूप से लागू नहीं होगा। मदद की बहुत सराहना की जाएगी।

+0

क्या उपयोगकर्ता 'सर्व-नियोक्ता' का लक्ष्य निर्देशिका है और क्या विशेषाधिकार हैं? – DevJem

+0

* "मैं देख सकता हूं कि 'जेसन 1.8.6' स्थापित है।" * ... नहीं, यह नहीं है, आपको केवल संस्करण 1.8.1' और '1.8.3' इंस्टॉल किया गया है ?! इसे स्थापित करते समय आपको क्या त्रुटि मिलती है? (आपके पास कुछ सिस्टम निर्भरता समस्याएं हो सकती हैं?) –

+0

रूबी '1.9.1' फ़ोल्डर के संबंध में - यह * एक मुद्दा नहीं होना चाहिए, क्योंकि उन पुस्तकालयों का उपयोग रूबी' 2.2' द्वारा नहीं किया जाएगा। लेकिन अगर आपको कुछ विरासत सॉफ्टवेयर के लिए पुरानी रूबी संस्करण की आवश्यकता नहीं है, तो हर तरह से इसके मामले में बस इसके सभी निशान हटा दें। –

उत्तर

3

सबसे संभावित कारण यह है कि आप कुछ सिस्टम निर्भरताओं को याद कर रहे हैं जो capistrano इंस्टॉल नहीं कर सकते हैं। अपने सर्वर पर

SSH और इसे फिर से समस्या, ssh को ठीक नहीं करता है और gem install json -v '1.8.6' चलाने के रूप में यह आपको बताता है और आप यहां से प्राप्त त्रुटि संदेश पोस्ट sudo apt-get install libgmp3-dev

इंस्टॉल करके देखें।

+0

हाय वहाँ! आपके समाधान का प्रयास करने के बाद भी मुझे समस्या है, मैंने अपडेट को बंडल करने की भी कोशिश की लेकिन फिर भी वही। कोई विचार ? – marman

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

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