Cap deploy: migration fails. Could not find gemfile

I am working on my first rail deployment and have a problem that I cannot understand. mac osx 10.8.2 ruby ​​1.8.7 Rails 3.2.6 rvm 1.17.2

I followed this tutorial http://brandnewrails.wordpress.com/ and got stuck on 7c. I installed everything in RVM, got git running on the server, ran bundle install in the application and wrote the Capistrano recipe in my_app / config / deploy.rb

Then I ran:

$ capify . no problems

$ cap deploy:setup no errors

$ cap deploy:check returned You appear to have all necessary dependencies installed

$ cap deploy:migrations a problem occurs. After successfully running a bunch of commands, capistrano fails. See below:

 2012-12-10 00:43:56 executing `bundle_install' * executing "cd /home/{servername}/party/releases/20121209134354 && bundle install --path vendor/bundle" servers: ["{servername}"] [{servername}] executing command ** [out :: {servername}] Could not locate Gemfile command finished in 694ms failed: "sh -c 'cd /home/alexchee/party/releases/20121209134354 && bundle install --path vendor/bundle'" on {servername} 

Does anyone know what to do? When I check the application directory, a Gemfile appears. Any ideas or further questions?

+1
source share
1 answer

The inability of capistrano to find the gemfile in this case seems to be a symptom of the fact that git was not initiated locally in the application, that is, on my own computer.

My guess is that since the Gemfile is the first file in the list above, that’s why it first created the error. If the program continued, it would probably have other errors.

Even if git is running on the server and the application is connected correctly, you must also initiate git locally and direct it to the appropriate files on your server for the deployment to work.

Excellent instructions are listed here: http://brandnewrails.wordpress.com/2012/10/14/lesson-7b/

0
source

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


All Articles