将rails应用程序部署到linode服务器时,堆栈级别是否太深错误?

时间:2017-11-25 05:13:52

标签: ruby-on-rails ruby deployment capistrano

我正在按照本教程将app部署到linode服务器。以前我已成功部署到linode服务器。这次我得到堆栈级别太深的错误。

https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma

生产linode服务器中的Ubuntu版本是17.04。

在完成所有部署步骤后,当我执行限制生产部署:初始时,我收到以下错误

 INFO START 2017-11-25 03:29:56 +0000 cap production deploy:initial
  INFO ---------------------------------------------------------------------------
 DEBUG [598edc13] Command: [ -d ~/.rvm ]
 DEBUG [598edc13] Finished in 8.488 seconds with exit status 0 (successful).
 DEBUG [36c71e7b] Running ~/.rvm/bin/rvm version on karaokesagar.com
 DEBUG [36c71e7b] Command: ~/.rvm/bin/rvm version
 DEBUG [36c71e7b]   rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
 DEBUG [36c71e7b]   
 DEBUG [36c71e7b] Finished in 0.721 seconds with exit status 0 (successful).
 DEBUG [617d85cf] Running ~/.rvm/bin/rvm current on karaokesagar.com
 DEBUG [617d85cf] Command: ~/.rvm/bin/rvm current
 DEBUG [617d85cf]   ruby-2.4.2
 DEBUG [617d85cf]   
 DEBUG [617d85cf] Finished in 0.740 seconds with exit status 0 (successful).
 DEBUG [9ab88745] Running ~/.rvm/bin/rvm default do ruby --version on karaokesagar.com
 DEBUG [9ab88745] Command: ~/.rvm/bin/rvm default do ruby --version
 DEBUG [9ab88745]   ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
 DEBUG [9ab88745]   
 DEBUG [9ab88745] Finished in 0.988 seconds with exit status 0 (successful).
  INFO [cfb7cd43] Running /usr/bin/env mkdir -p /tmp on karaokesagar.com
 DEBUG [cfb7cd43] Command: /usr/bin/env mkdir -p /tmp
  INFO [cfb7cd43] Finished in 0.473 seconds with exit status 0 (successful).
 DEBUG Uploading /tmp/git-ssh-karaoke-production-ubuntu.sh 0.0%
  INFO Uploading /tmp/git-ssh-karaoke-production-ubuntu.sh 100.0%
  INFO [c33a7c23] Running /usr/bin/env chmod 700 /tmp/git-ssh-karaoke-production-ubuntu.sh on karaokesagar.com
 DEBUG [c33a7c23] Command: /usr/bin/env chmod 700 /tmp/git-ssh-karaoke-production-ubuntu.sh
  INFO [c33a7c23] Finished in 0.452 seconds with exit status 0 (successful).
  INFO [3033792c] Running /usr/bin/env git ls-remote git@bitbucket.org:kofhearts/karaokesansar.git HEAD on karaokesagar.com
 DEBUG [3033792c] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env git ls-remote git@bitbucket.org:kofhearts/karaokesansar.git HEAD )
 DEBUG [3033792c]   d79f75cee9853e0c2b2c488118a4c68048a40422
 DEBUG [3033792c]       HEAD
  INFO [3033792c] Finished in 1.427 seconds with exit status 0 (successful).
  INFO [8ef83012] Running /usr/bin/env mkdir -p /home/deploy/apps/karaoke/shared /home/deploy/apps/karaoke/releases on karaokesagar.com
 DEBUG [8ef83012] Command: /usr/bin/env mkdir -p /home/deploy/apps/karaoke/shared /home/deploy/apps/karaoke/releases
  INFO [8ef83012] Finished in 0.409 seconds with exit status 0 (successful).
  INFO [c0d1a7ac] Running /usr/bin/env mkdir -p /home/deploy/apps/karaoke/shared/public/assets on karaokesagar.com
 DEBUG [c0d1a7ac] Command: /usr/bin/env mkdir -p /home/deploy/apps/karaoke/shared/public/assets
  INFO [c0d1a7ac] Finished in 0.454 seconds with exit status 0 (successful).
 DEBUG [445830bb] Running [ -f /home/deploy/apps/karaoke/shared/puma.rb ] on karaokesagar.com
 DEBUG [445830bb] Command: [ -f /home/deploy/apps/karaoke/shared/puma.rb ]
 DEBUG [445830bb] Finished in 0.453 seconds with exit status 0 (successful).
 DEBUG [cbca27f5] Running [ -f /home/deploy/apps/karaoke/current/REVISION ] on karaokesagar.com
 DEBUG [cbca27f5] Command: [ -f /home/deploy/apps/karaoke/current/REVISION ]
 DEBUG [cbca27f5] Finished in 0.445 seconds with exit status 1 (failed).
 DEBUG [30b29881] Running [ -f /home/deploy/apps/karaoke/repo/HEAD ] on karaokesagar.com
 DEBUG [30b29881] Command: [ -f /home/deploy/apps/karaoke/repo/HEAD ]
 DEBUG [30b29881] Finished in 0.444 seconds with exit status 0 (successful).
  INFO The repository mirror is at /home/deploy/apps/karaoke/repo
 DEBUG [c9d9e8a5] Running if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi on karaokesagar.com
 DEBUG [c9d9e8a5] Command: if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi
 DEBUG [c9d9e8a5] Finished in 0.447 seconds with exit status 0 (successful).
  INFO [560e0445] Running /usr/bin/env git remote set-url origin git@bitbucket.org:kofhearts/karaokesansar.git on karaokesagar.com
 DEBUG [560e0445] Command: cd /home/deploy/apps/karaoke/repo && ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env git remote set-url origin git@bitbucket.org:kofhearts/karaokesansar.git )
  INFO [560e0445] Finished in 0.455 seconds with exit status 0 (successful).
  INFO [cd7fd82e] Running /usr/bin/env git remote update --prune on karaokesagar.com
 DEBUG [cd7fd82e] Command: cd /home/deploy/apps/karaoke/repo && ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env git remote update --prune )
 DEBUG [cd7fd82e]   Fetching origin
 DEBUG [cd7fd82e]   
  INFO [cd7fd82e] Finished in 1.505 seconds with exit status 0 (successful).
 DEBUG [aeba79fe] Running if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi on karaokesagar.com
 DEBUG [aeba79fe] Command: if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi
 DEBUG [aeba79fe] Finished in 0.411 seconds with exit status 0 (successful).
  INFO [f2eaad41] Running /usr/bin/env mkdir -p /home/deploy/apps/karaoke/releases/20171125033012 on karaokesagar.com
 DEBUG [f2eaad41] Command: cd /home/deploy/apps/karaoke/repo && ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env mkdir -p /home/deploy/apps/karaoke/releases/20171125033012 )
  INFO [f2eaad41] Finished in 0.451 seconds with exit status 0 (successful).
  INFO [5e835bed] Running /usr/bin/env git archive master | /usr/bin/env tar -x -f - -C /home/deploy/apps/karaoke/releases/20171125033012 on karaokesagar.com
 DEBUG [5e835bed] Command: cd /home/deploy/apps/karaoke/repo && ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env git archive master | /usr/bin/env tar -x -f - -C /home/deploy/apps/karaoke/releases/20171125033012 )
  INFO [5e835bed] Finished in 0.569 seconds with exit status 0 (successful).
 DEBUG [ce808311] Running if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi on karaokesagar.com
 DEBUG [ce808311] Command: if test ! -d /home/deploy/apps/karaoke/repo; then echo "Directory does not exist '/home/deploy/apps/karaoke/repo'" 1>&2; false; fi
 DEBUG [ce808311] Finished in 0.449 seconds with exit status 0 (successful).
 DEBUG [26122d06] Running /usr/bin/env git rev-list --max-count=1 master on karaokesagar.com
 DEBUG [26122d06] Command: cd /home/deploy/apps/karaoke/repo && ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-karaoke-production-ubuntu.sh" ; /usr/bin/env git rev-list --max-count=1 master )
 DEBUG [26122d06]   d79f75cee9853e0c2b2c488118a4c68048a40422
 DEBUG [26122d06]   
 DEBUG [26122d06] Finished in 0.449 seconds with exit status 0 (successful).
 DEBUG [1e5a5e74] Running if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi on karaokesagar.com
 DEBUG [1e5a5e74] Command: if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi
 DEBUG [1e5a5e74] Finished in 0.453 seconds with exit status 0 (successful).
  INFO [6f3e3303] Running /usr/bin/env echo "d79f75cee9853e0c2b2c488118a4c68048a40422" >> REVISION on karaokesagar.com
 DEBUG [6f3e3303] Command: cd /home/deploy/apps/karaoke/releases/20171125033012 && /usr/bin/env echo "d79f75cee9853e0c2b2c488118a4c68048a40422" >> REVISION
  INFO [6f3e3303] Finished in 0.451 seconds with exit status 0 (successful).
  INFO [7410c8d3] Running /usr/bin/env mkdir -p /home/deploy/apps/karaoke/releases/20171125033012/public on karaokesagar.com
 DEBUG [7410c8d3] Command: /usr/bin/env mkdir -p /home/deploy/apps/karaoke/releases/20171125033012/public
  INFO [7410c8d3] Finished in 0.449 seconds with exit status 0 (successful).
 DEBUG [81416c34] Running [ -L /home/deploy/apps/karaoke/releases/20171125033012/public/assets ] on karaokesagar.com
 DEBUG [81416c34] Command: [ -L /home/deploy/apps/karaoke/releases/20171125033012/public/assets ]
 DEBUG [81416c34] Finished in 0.456 seconds with exit status 1 (failed).
 DEBUG [a5177be9] Running [ -d /home/deploy/apps/karaoke/releases/20171125033012/public/assets ] on karaokesagar.com
 DEBUG [a5177be9] Command: [ -d /home/deploy/apps/karaoke/releases/20171125033012/public/assets ]
 DEBUG [a5177be9] Finished in 0.449 seconds with exit status 1 (failed).
  INFO [c644ee05] Running /usr/bin/env ln -s /home/deploy/apps/karaoke/shared/public/assets /home/deploy/apps/karaoke/releases/20171125033012/public/assets on karaokesagar.com
 DEBUG [c644ee05] Command: /usr/bin/env ln -s /home/deploy/apps/karaoke/shared/public/assets /home/deploy/apps/karaoke/releases/20171125033012/public/assets
  INFO [c644ee05] Finished in 0.447 seconds with exit status 0 (successful).
 DEBUG [91e265b4] Running if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi on karaokesagar.com
 DEBUG [91e265b4] Command: if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi
 DEBUG [91e265b4] Finished in 0.447 seconds with exit status 0 (successful).
 DEBUG [b0e66b40] Running ~/.rvm/bin/rvm default do bundle check --path /home/deploy/apps/karaoke/shared/bundle on karaokesagar.com
 DEBUG [b0e66b40] Command: cd /home/deploy/apps/karaoke/releases/20171125033012 && ~/.rvm/bin/rvm default do bundle check --path /home/deploy/apps/karaoke/shared/bundle
 DEBUG [b0e66b40]   [31mThe following gems are missing[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * net-ssh (4.2.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * net-scp (1.2.1)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * sshkit (1.15.1)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * airbrussh (1.3.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * debug_inspector (0.0.3)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * binding_of_caller (0.7.2)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * byebug (9.1.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * capistrano (3.10.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * capistrano-bundler (1.3.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * capistrano-rails (1.3.1)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * capistrano-rvm (0.1.2)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * capistrano3-puma (3.1.1)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * spring (2.0.2)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * sqlite3 (1.3.13)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [31m * web-console (2.3.0)[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40]   [33mInstall missing gems with `bundle install`[0m
 DEBUG [b0e66b40]   
 DEBUG [b0e66b40] Finished in 1.448 seconds with exit status 1 (failed).
  INFO [63b1c824] Running ~/.rvm/bin/rvm default do bundle install --path /home/deploy/apps/karaoke/shared/bundle --without development test --deployment --quiet on karaokesagar.com
 DEBUG [63b1c824] Command: cd /home/deploy/apps/karaoke/releases/20171125033012 && ~/.rvm/bin/rvm default do bundle install --path /home/deploy/apps/karaoke/shared/bundle --without development test --deployment --quiet
  INFO [63b1c824] Finished in 1.675 seconds with exit status 0 (successful).
 DEBUG [5cf60307] Running if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi on karaokesagar.com
 DEBUG [5cf60307] Command: if test ! -d /home/deploy/apps/karaoke/releases/20171125033012; then echo "Directory does not exist '/home/deploy/apps/karaoke/releases/20171125033012'" 1>&2; false; fi
 DEBUG [5cf60307] Finished in 0.450 seconds with exit status 0 (successful).
  INFO [ca0f0299] Running ~/.rvm/bin/rvm default do bundle exec rake assets:precompile on karaokesagar.com
 DEBUG [ca0f0299] Command: cd /home/deploy/apps/karaoke/releases/20171125033012 && ( export RAILS_ENV="production" RAILS_GROUPS="" ; ~/.rvm/bin/rvm default do bundle exec rake assets:precompile )
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   rake aborted!
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   SystemStackError: stack level too deep
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy/apps/karaoke/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
 DEBUG [ca0f0299]   
 DEBUG [ca0f0299]   /home/deploy

我感谢任何帮助我面临的这种困境。谢谢!

更新:

我还试图通过

增加堆栈大小
ulimit -s 32384

但这也没有帮助。

1 个答案:

答案 0 :(得分:0)

确定捆绑更新完成了这项工作。事实证明,默认应用程序使用了很多旧的宝石,所以在更新并将其推送到repo然后将其部署到它工作的远程vps之后。