Reputation: 2264
I am on rails using rvm,
I get following error when deplying using capistrano:
Skipping task `deploy:updating'.
Capistrano tasks may only be invoked once. Since task `deploy:updating' was previously invoked, invoke("deploy:updating") at /home/ziaulrehman/.rvm/gems/ruby-2.3.4/gems/capistrano-3.8.2/lib/capistrano/tasks/framework.rake:64 will be skipped.
If you really meant to run this task again, first call Rake::Task["deploy:updating"].reenable
THIS BEHAVIOR MAY CHANGE IN A FUTURE VERSION OF CAPISTRANO. Please join the conversation here if this affects you.
https://github.com/capistrano/capistrano/issues/1686
my capfile has:
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'rvm1/capistrano3'
require 'capistrano/puma'
require 'capistrano/sidekiq'
install_plugin Capistrano::Puma
install_plugin Capistrano::Puma::Nginx
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/rails/assets"
# there are no customm tasks
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
And my deploy.rb looks something like:
# config valid only for current version of Capistrano
lock "3.8.2"
set :application, "webapp"
set :deploy_via, :remote_cache
set :keep_releases, 5
set :repo_url, "[email protected]:org/webapp.git"
append :linked_files, 'config/database.yml', 'config/secrets.yml', '.env.generic'
append :linked_dirs, 'vendor/bundle', 'public/uploads'
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, "/home/deployer/www/webapp"
set :rvm1_ruby_version, 'ruby-2.3.4'
# set :rvm_type, :user
# set :default_env, { rvm_bin_path: '~/.rvm/bin' }
# fetch(:default_env).merge!( rvm_path: '~/.rvm/bin' )
set :rvm1_map_bins, -> { fetch(:rvm_map_bins).to_a.concat(%w{rake gem bundle ruby foreman}).uniq }
before 'deploy', 'rvm1:install:ruby'
set :sidekiq_processes => 2
set :keep_assets, 2
set :sidekiq_config => '#{release_path}/config/sidekiq.yml'
set :pty, true
I have absolutely no custom task or anything, these are all gems I am using, i suspect some kind of conflict in gems.
If anyone can point out exactly where this issue is being created and how can I fix this, would be great. Also, i would like to know the implications of the issue. Everything seems to work fine for now.
Upvotes: 2
Views: 480
Reputation: 11102
This is a problem caused by the rvm1-capistrano3
gem. I took a quick look at that gem's source code on GitHub, and it is doing weird things like registering hooks like this:
before :ruby, "deploy:updating"
This makes no sense to me; it means that if you invoke rvm1:install:ruby
at the beginning of a deployment (as suggested by the README), then it will trigger deploy:updating
before your deploy has even started. That normally is supposed to trigger at the end of a deployment. The fact that this gem works at all is surprising.
The Skipping task
warning is important. Your deploy may work, but it is worrisome nonetheless. I recommend finding an alternative to the rvm1-capistrano3
gem.
Upvotes: 4