运行cap生产deploy:initial []时,Ruby on Rails Capistrano'无法找到Gemfile'错误 [英] Ruby on Rails Capistrano 'Could not locate Gemfile' error when running cap production deploy:initial[]

查看:90
本文介绍了运行cap生产deploy:initial []时,Ruby on Rails Capistrano'无法找到Gemfile'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启动RoR应用程序,并在运行cap生产deploy时遇到以下错误:initial []

I'm trying to launch a RoR application and get the following error when running cap production deploy:initial[]

我对RoR和设置一般,因此我无法提供更多详细信息,但能够回答问题。

I'm very new to RoR and the setup in general so I cannot provide more detail but am able to answer questions.

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的相应文件夹...这可能是为什么它不起作用的原因吗?

The way my repo is set up is I hate the repo, then two sub directories. One containing the RoR files and the other some python code. When I set up deploy.rb the github link only points to the repository, not the corresponding folder with the RoR files and the Gemfile... could this be why it is not working?

推荐答案

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

First check the Gemfile is present in server or not.

如果存在,则在配置中指定位置

If present, then specify the location in your configuration file by adding below code.


set:bundle_gemfile, rails_code / Gemfile

这篇关于运行cap生产deploy:initial []时,Ruby on Rails Capistrano'无法找到Gemfile'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆