Ruby on Rails Capistrano'找不到Gemfile'运行cap生产部署时出错:initial []

时间:2015-10-22 00:10:40

标签: ruby-on-rails ruby capistrano

我尝试启动RoR应用程序并在运行资源生产部署时遇到以下错误:initial []

我对RoR和整体设置都很陌生,所以我无法提供更多详细信息,但能够回答问题。

INFO [ac02eabc] Running ~/.rvm/bin/rvm default do bundle install --path /home/deploy/apps/Interface/shared/bundle --without development test --deployment --quiet on 178.62.51.103
DEBUG [ac02eabc] Command: cd /home/deploy/apps/Interface/releases/20151022000628 && ~/.rvm/bin/rvm default do bundle install --path /home/deploy/apps/Interface/shared/bundle --without development test --deployment --quiet
DEBUG [ac02eabc]    Could not locate Gemfile
DEBUG [ac02eabc]    
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 178.62.51.103: Exception while executing on host 178.62.51.103: bundle exit status: 10
bundle stdout: Could not locate Gemfile
bundle stderr: Nothing written

SSHKit::Runner::ExecuteError: Exception while executing on host 178.62.51.103: bundle exit status: 10
bundle stdout: Could not locate Gemfile
bundle stderr: Nothing written

SSHKit::Command::Failed: bundle exit status: 10
bundle stdout: Could not locate Gemfile
bundle stderr: Nothing written

Tasks: TOP => deploy:initial
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing on host 178.62.51.103: Exception while executing on host 178.62.51.103: bundle exit status: 10
bundle stdout: Could not locate Gemfile
bundle stderr: Nothing written
jordan@Jordans-MacBook-Air:~/revolvr/Interface$ 

我的回购设置的方式是我讨厌回购,然后是两个子目录。一个包含RoR文件,另一个包含一些python代码。当我设置deploy.rb时,github链接只指向存储库,而不是指向具有RoR文件和Gemfile的相应文件夹......这可能是它无法正常工作的原因吗?

1 个答案:

答案 0 :(得分:1)

首先检查Gemfile是否存在于服务器中。

如果存在,请通过添加以下代码在配置文件中指定位置。

  

set :bundle_gemfile, "rails_code/Gemfile"