Closed dvodvo closed 4 years ago
Does it work if you use bundle exec cap
instead of just cap
?
E.g.
bundle exec cap development deploy
Unfortunately not. Identical behaviour.
Hmm. Based on this error message:
Don't know how to build task 'deploy:updated'
Perhaps that is an indication that your Capfile is not loading the standard deploy tasks? Your Capfile should look something like this:
require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/bundler"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
Could you post your full Capfile
?
Right: the order matters. So I crossed my wires a while ago. The reason being I was getting errors are found a way to deploy by ignoring 'capistrano/rails'
Warning: the running version of Bundler (2.0.1) is older than the version that created the lockfile (2.1.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
DEBUG [b094a510] Your Ruby version is 2.3.1, but your Gemfile specified 2.6.1
after having just executed 'gem install bundler' (returning 2.1.4) and
$ ruby -v
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
The capfile has:
require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# require "capistrano/rails"
# previous line covers these default deployment tasks
require "capistrano/bundler"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
where I swapped, back and forth, the single 'catch-all' require for the three individual ones. Always same result -> Failures starts at asset deployment :
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [ceabb5cf] Running [ -L /home/jerdvo/supermarket/releases/20200702032720/public/assets ] as jerdvo@138.68.104.77
DEBUG [ceabb5cf] Command: [ -L /home/jerdvo/supermarket/releases/20200702032720/public/assets ]
This is consistent across 3 applications on 2 servers (Ubuntu 16.04 and 20.04)
Looks like the LoadError
that you originally reported is resolved, so I will close this issue.
Please open a separate issue with the new error that you are seeing. When you open the issue make sure it has detailed reproduction steps, the full output including error message and stack trace, as well as the output of cap doctor
. That will help identify the bug. We use GitHub issues for bug reports, not as a general discussion forum or for user support. Thanks for your help!
Steps to reproduce
gem file as follows:
Expected behavior
I expected, according to the ReadMe file to require everything or individually to have migrations run and/or assets pre-compiled, in either development or production mode (I have the same set-up with the same rails version (5.2.4) and ruby (2.6.1) on multiple applications; the behaviour is consistent)
Actual behavior
getting errors as follows:
System configuration
with
--trace