jonnyjava.net
jonnyjava.net

Reputation: 932

Deploying with capistrano 3 throws can't convert Rake::Task to String

I'm trying to do my first deploy with capistrano3. I'm really new on this and I'm stuck here: running

 cap deploy:setup

I get this error

cap aborted!
TypeError: can't convert Rake::Task to String

In my deploy.rb file I have this

require 'capistrano/setup' 
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rvm'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require "whenever/capistrano"
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }

after a lot of googling I've found something about rvm1-capistrano3; but if I change this line

require 'capistrano/rvm'

with this one

require 'rvm1/capistrano3'

But nothing changes. I still receive that error. Of course I've tried every kind of reinstallation or update but I can't get out of this.

Upvotes: 1

Views: 189

Answers (1)

BroiSatse
BroiSatse

Reputation: 44715

This seems to be an issue with the newest release of rake (10.2.1). Specifying its version to '10.1.1' worked for me:

# In your gemfile
gem 'rake', '10.1.1'

Then run bundle update rake, commit all files (including Gemfle.lock), push to origin and redeploy.

Upvotes: 1

Related Questions