Capistrano Could Not Detect Gemfile Error When Deploying Application

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

For deployment, I use the following command:

cap production deploy 

However, a failure in some part requires a gemfile. Here's the failed deployment log:

 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 the necessary things:

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

I searched half the Internet and tried many things, looked through many questions here, and now I understand that I really do not know what to do, so I ask you for help. Thanks!

+6
source share
1 answer

Make sure Gemfile and Gemfile.lock are Gemfile.lock in Git. For example, you can run:

 git log Gemfile git log Gemfile.lock 

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

Running a command on a server manually 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 
+2
source

Source: https://habr.com/ru/post/971466/


All Articles