इस प्रश्न को स्टैक ओवरफ्लो और अन्य मंचों पर दो बार पूछा गया है, लेकिन मुझे लगता है कि मुझे यह त्रुटि पारित नहीं हो रही है। जब मैं 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
है। क्या यह समस्या का स्रोत हो सकता है। मैं इस पर फंस गया हूं और ऐसा लगता है कि इन तरह के प्रश्न हमेशा किसी की मशीन पर विशिष्ट कुछ से संबंधित होते हैं जो आवश्यक रूप से लागू नहीं होगा। मदद की बहुत सराहना की जाएगी।
क्या उपयोगकर्ता 'सर्व-नियोक्ता' का लक्ष्य निर्देशिका है और क्या विशेषाधिकार हैं? – DevJem
* "मैं देख सकता हूं कि 'जेसन 1.8.6' स्थापित है।" * ... नहीं, यह नहीं है, आपको केवल संस्करण 1.8.1' और '1.8.3' इंस्टॉल किया गया है ?! इसे स्थापित करते समय आपको क्या त्रुटि मिलती है? (आपके पास कुछ सिस्टम निर्भरता समस्याएं हो सकती हैं?) –
रूबी '1.9.1' फ़ोल्डर के संबंध में - यह * एक मुद्दा नहीं होना चाहिए, क्योंकि उन पुस्तकालयों का उपयोग रूबी' 2.2' द्वारा नहीं किया जाएगा। लेकिन अगर आपको कुछ विरासत सॉफ्टवेयर के लिए पुरानी रूबी संस्करण की आवश्यकता नहीं है, तो हर तरह से इसके मामले में बस इसके सभी निशान हटा दें। –