From ce500eb18df83aef0d60faf425c23c0d08c19164 Mon Sep 17 00:00:00 2001 From: Dylan Markow Date: Tue, 25 Mar 2014 21:06:29 -0500 Subject: [PATCH] Use a string for the ensure_stage task Rake 10.2.0 introduced new task name checking which started raising `TypeError: no implicit conversion of Rake::Task into String` errors when trying to deploy. This is because `@top_level_tasks` is expected to contain strings, not Rake::Task objects. --- CHANGELOG.md | 1 + lib/capistrano/application.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e078486..ad63a57d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Reverse Chronological Order: * Minor changes: * Added `keys` method to Server properties to allow introspection of automatically added properties. + * Compatibility with Rake 10.2.0 - `ensure_task` is now added to `@top_level_tasks` as a string. (@dmarkow) ## `3.1.0` diff --git a/lib/capistrano/application.rb b/lib/capistrano/application.rb index 537ad83c..b942c784 100644 --- a/lib/capistrano/application.rb +++ b/lib/capistrano/application.rb @@ -24,7 +24,7 @@ module Capistrano if tasks_without_stage_dependency.include?(@top_level_tasks.first) @top_level_tasks else - @top_level_tasks.unshift(ensure_stage) + @top_level_tasks.unshift(ensure_stage.to_s) end end