2017-05-03 6 views
9

이 질문은 stackoverflow 및 다른 포럼에서 몇 번 질문했지만이 오류가 전달되는 것 같지 않습니다. capistrano production deploy을 실행하면이 오류가 배포 프로세스의 일부로 발생합니다.Json -v 1.8.6은 capistrano 배포본의 일부로 설치되지 않습니다

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의 실행중인 버전이 오래되어 최신 버전을 설치해야한다는 것을 알려줍니다. 여기에 내가 이해하지 못하는 것이있다. 내 개발 기계에, 나는 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 디렉터리 안에 및 2.2.0이있는 ruby 폴더가 있습니다. 이것이 문제의 원인 일 수 있습니까? 나는이 문제에 난처한 상황에 처해 있으며, 항상 이와 같은 질문은 항상 적용될 필요가없는 누군가의 기계에 특정한 것에 관련이있는 것으로 보인다. 도움말 크게 감사하겠습니다.

+0

사용자'serv-deployer'가 대상 디렉토리를 소유하고 있으며 쓰기 권한이 있습니까? – DevJem

+0

* "json 1.8.6"이 설치되어있는 것을 볼 수 있습니다. "* ... 아니, 1.8.1 버전과 1.8.3 버전 만 설치 되었습니까? 이것을 설치할 때 어떤 오류가 있습니까? (시스템 의존성 문제가있을 수 있습니다.) –

+0

또한 ruby'1.9.1' 폴더와 관련하여 -이 라이브러리는 루비 2.2에서 사용되지 않으므로 * 문제가되어서는 안됩니다. 그러나 기존의 소프트웨어를 위해 오래된 루비 버전이 필요 없다면, 모든 경우에 대비하여 모든 흔적을 제거하십시오. –

답변

3

가장 많이 발생하는 원인은 capistrano가 설치할 수없는 시스템 종속성이 누락되었습니다. 다시 문제, SSH를 해결하고 당신을 알려줍니다으로 gem install json -v '1.8.6'를 실행하고 여기에서 얻을 오류 메시지를 게시하지 않을 경우 서버에 대한

쉿 및 sudo apt-get install libgmp3-dev

를 설치하십시오.

+0

안녕하세요! 나는 당신의 솔루션을 시도한 후에도 여전히 문제를 안고있다. 어떤 아이디어? – marman