Json -v 1.8.6 不会作为 capistrano 部署的一部分安装
Json -v 1.8.6 will not install as part of capistrano deploy
这个问题已在 Whosebug 和其他论坛上被问过几次,但我似乎无法通过我遇到的这个错误。当我 运行 capistrano production deploy
时,我在部署过程中收到此错误。
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 serv-deployer@oh-utility01.dc1.lan: 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 serv-deployer@oh-utility01.dc1.lan
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 serv-deployer@oh-utility01.dc1.lan
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 serv-deployer@oh-utility01.dc1.lan
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.
所以首先要注意。日志告诉我捆绑器的 运行ning 版本已经过时,我应该安装最新的。这是我不明白的地方。在我的开发机器上,我有 Bundler version 1.14.6
。在我尝试部署到的目标服务器上,我也有 Bundler version 1.14.6
。我在两台机器上都确认过,确实是一样的。其次,对于开发机器和目标机器,我有相同的 ruby 版本。 ruby 版本为 2.2.5
。
其次,当我在目标服务器上运行 gem list
时,我可以看到安装了json 1.8.6
。
json (1.8.3, 1.8.1)
什么给了?
最后,问题必须出在目标机器上的这个目录中/var/local/blackduck_flock_rails/shared/bundle
。在 bundle
目录中,我有一个包含 1.9.1
和 2.2.0
的 ruby
文件夹。这可能是问题的根源。我对这个问题感到困惑,似乎像这样的问题总是与某人机器上不一定适用的特定问题有关。将不胜感激。
最可能的原因是您缺少一些 capistrano 无法安装的系统依赖项。
通过 Ssh 连接到您的服务器并尝试安装 sudo apt-get install libgmp3-dev
如果它不能解决问题,请再次 ssh 并运行 gem install json -v '1.8.6'
它告诉你的 post 你从这里得到的错误消息。
这个问题已在 Whosebug 和其他论坛上被问过几次,但我似乎无法通过我遇到的这个错误。当我 运行 capistrano production deploy
时,我在部署过程中收到此错误。
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 serv-deployer@oh-utility01.dc1.lan: 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 serv-deployer@oh-utility01.dc1.lan
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 serv-deployer@oh-utility01.dc1.lan
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 serv-deployer@oh-utility01.dc1.lan
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.
所以首先要注意。日志告诉我捆绑器的 运行ning 版本已经过时,我应该安装最新的。这是我不明白的地方。在我的开发机器上,我有 Bundler version 1.14.6
。在我尝试部署到的目标服务器上,我也有 Bundler version 1.14.6
。我在两台机器上都确认过,确实是一样的。其次,对于开发机器和目标机器,我有相同的 ruby 版本。 ruby 版本为 2.2.5
。
其次,当我在目标服务器上运行 gem list
时,我可以看到安装了json 1.8.6
。
json (1.8.3, 1.8.1)
什么给了?
最后,问题必须出在目标机器上的这个目录中/var/local/blackduck_flock_rails/shared/bundle
。在 bundle
目录中,我有一个包含 1.9.1
和 2.2.0
的 ruby
文件夹。这可能是问题的根源。我对这个问题感到困惑,似乎像这样的问题总是与某人机器上不一定适用的特定问题有关。将不胜感激。
最可能的原因是您缺少一些 capistrano 无法安装的系统依赖项。
通过 Ssh 连接到您的服务器并尝试安装 sudo apt-get install libgmp3-dev
如果它不能解决问题,请再次 ssh 并运行 gem install json -v '1.8.6'
它告诉你的 post 你从这里得到的错误消息。