简体   繁体   English

Capistrano Bundler部署错误

[英]Capistrano Bundler error on deployment

I am trying to use capistrano to deploy and bundle my rails application. 我正在尝试使用capistrano部署和捆绑我的Rails应用程序。 When I run cap deploy - or more specifically 当我运行cap deploy-或更具体地说

bundle exec cap staging bundler:install --trace

I seem to have a perpetual error with the following stack trace. 我似乎与下面的堆栈跟踪永久错误。

** Invoke staging (first_time)
** Execute staging
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke bundler:install (first_time)
** Execute bundler:install
DEBUG [bd567504] Running /usr/bin/env if test ! -d /var/www/TMC/current; then echo "Directory does not exist '/var/www/TMC/current'" 1>&2; false; fi on 162.243.225.14
DEBUG [bd567504] Command: if test ! -d /var/www/TMC/current; then echo "Directory does not exist '/var/www/TMC/current'" 1>&2; false; fi
DEBUG [bd567504] Finished in 1.443 seconds with exit status 0 (successful).
 INFO [2058712b] Running /usr/bin/env bundle install --binstubs /var/www/TMC/shared/bin --path /var/www/TMC/shared/bundle --without development test --deployment --quiet on 162.243.225.14
DEBUG [2058712b] Command: cd /var/www/TMC/current && /usr/bin/env bundle install --binstubs /var/www/TMC/shared/bin --path /var/www/TMC/shared/bundle --without development test --deployment --quiet
DEBUG [2058712b]    /usr/bin/env: bundle: No such file or directory
cap aborted!
SSHKit::Command::Failed: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: /usr/bin/env: bundle: No such file or directory
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.4.0/lib/sshkit/command.rb:98:in `exit_status='

I used chef to provision the machine and setup RBENV etc so i am not using capistrano/rbenv. 我用厨师来配置机器并设置RBENV等,所以我没有使用capistrano / rbenv。 The relevant section of my gemfile reads: 我的gemfile的相关部分为:

group :development do
      gem 'capistrano-rails', '~> 1.0.0'
      gem 'capistrano-bundler', '~> 1.1.2'
end

I had to login and manually create the current directory in the /var/www/TMC/current path. 我必须登录并在/ var / www / TMC / current路径中手动创建当前目录。

Any ideas would be appreciated. 任何想法,将不胜感激。

Are you sure you have gem Bundler installed on the server for you current rvm? 您确定为当前rvm在服务器上安装了gem Bundler吗? It looks like bundle is not installed on your server. 看来您的服务器上未安装捆绑软件。 Try installing bundler first: 尝试先安装捆绑程序:

sudo apt-get install bundler

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM