Capistrano在应用程序部署上找不到Gemfile错误 [英] Capistrano could not locate Gemfile error on application deployment

查看:100
本文介绍了Capistrano在应用程序部署上找不到Gemfile错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试将Rails应用程序部署到生产服务器,并决定使用本指南 + RVM。

I'm trying to deploy my Rails application to production server and I decided to deploy it to DigitalOcean using this guide + RVM.

要部署,我使用以下命令:

To deploy I use following command:

cap production deploy

但是,它在某些需要gemfile的地方失败。以下是部署失败的日志:

However, it fails at some part requiring gemfile. Here's the log of failed deployment:

DEBUG[323dfd0e] Command: cd /home/deploy/zwiadowcy/releases/20140628164657 && ~/.rvm/bin/rvm default do bundle install --binstubs /home/deploy/zwiadowcy/shared/bin --path
/home/deploy/zwiadowcy/shared/bundle --without development test --deployment --quiet
DEBUG[323dfd0e]     Could not locate Gemfile
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host my_ip_address: bundle exit status: 10
bundle stdout: Nothing written
bundle stderr: Nothing written

我的gemfile已经包含所有必需的内容:

My gemfile already contains all required things:

gem 'capistrano', '~> 3.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails', '~> 1.1.1'
gem 'capistrano-rvm', github: "capistrano/rvm"

我已经搜索了一半的Internet,并尝试了许多事情,在这里浏览了许多问题,但现在我真的不知道该怎么做,所以请您寻求帮助。谢谢!

I've googled half of the Internet and tried many things, looked through many questions here and I'm now at the point that I don't really know what to do so I kindly ask you for help. Thanks!

推荐答案

验证 Gemfile Gemfile.lock 已在Git中检查。例如,您可以运行:

Verify that Gemfile and Gemfile.lock are checked in Git. For example you could run:

git log Gemfile
git log Gemfile.lock

您还可以验证这些文件是否位于 / home / deploy / zwiadowcy / releases / 20140628164657 在服务器上。

You can also verify that those files are present in /home/deploy/zwiadowcy/releases/20140628164657 on the server.

手动运行服务器中的命令也有帮助:

Running manually the command in the server also helps:

cd /home/deploy/zwiadowcy/releases/20140628164657 && ~/.rvm/bin/rvm default do bundle install --binstubs /home/deploy/zwiadowcy/shared/bin --path /home/deploy/zwiadowcy/shared/bundle --without development test --deployment

这篇关于Capistrano在应用程序部署上找不到Gemfile错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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