capistrano / symfony

Capistrano tasks for deploying the Symfony standard edition
MIT License
354 stars 65 forks source link

Error: `execute' should be wrapped in an `on' #115

Closed romaricdrigon closed 5 years ago

romaricdrigon commented 5 years ago

Hello,

It looks like an old issue (#73) is back. I'm getting this error while deploying:

Warning: `execute' should be wrapped in an `on' scope in /xxx/lib/capistrano/dsl/symfony.rb:42.

  task :example do
    on roles(:app) do
      execute 'whoami'
    end
  end

(Backtrace restricted to imported tasks)
cap aborted!
NoMethodError: undefined method `execute' for main:Object

Tasks: TOP => database:migrate
(See full trace by running task with --trace)
The deploy has failed with an error: undefined method `execute' for main:Object