[英]Capistrano could not locate Gemfile error on application deployment
I'm trying to deploy my Rails application to production server and I decided to deploy it to DigitalOcean using this guide + RVM. 我正在尝试将我的Rails应用程序部署到生产服务器,我决定使用本指南 + RVM将其部署到DigitalOcean。
To deploy I use following command: 要部署我使用以下命令:
cap production deploy
However, it fails at some part requiring gemfile. 但是,它在某些需要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
My gemfile already contains all required things: 我的gemfile已包含所有必需的东西:
gem 'capistrano', '~> 3.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails', '~> 1.1.1'
gem 'capistrano-rvm', github: "capistrano/rvm"
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. 我用Google搜索了一半的互联网并试了很多东西,在这里查看了很多问题,我现在已经到了我不知道该怎么办的地步,所以我请求你帮忙。 Thanks! 谢谢!
Verify that Gemfile
and Gemfile.lock
are checked in Git. 验证是否在Git中检查了Gemfile
和Gemfile.lock
。 For example you could run: 例如,您可以运行:
git log Gemfile
git log Gemfile.lock
You can also verify that those files are present in /home/deploy/zwiadowcy/releases/20140628164657
on the server. 您还可以验证服务器上的/home/deploy/zwiadowcy/releases/20140628164657
是否存在这些文件。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.