Giter Club home page Giter Club logo

Comments (6)

ninodafonte avatar ninodafonte commented on July 22, 2024 4

Hi @gido,

I had this issue yesterday and as I didn't have too much time to dig into the code and see what's the real problem here, my workaround was to use the "old" way:

invoke 'symfony:console', 'doctrine:migrations:migrate', '--no-interaction', 'db'
instead of the symfony:console(blabla) thing.

Hope this works for you in the meantime, I'll try to find out the real reason if nobody gets there before,

Cheers,

ps: after another try, it looks like enclosing the symfony:console command in a on roles clause, it works. I've read that has something to do with a syntax change in capistrano 3.x (sorry, I have almost no experience with ruby).

This works for me as well:

namespace :deploy do
  desc "Dumping assetic assets"
  task :assetic_dump do
    on roles(:all) do
      symfony_console "assetic:dump"
    end
  end
end

from symfony.

gido avatar gido commented on July 22, 2024 1

Enclosing the symfony:console command in a on roles clause (which is the recommended way) solve the issue.

I'm closing it.

from symfony.

ChristianVermeulen avatar ChristianVermeulen commented on July 22, 2024 1

@gido I'm using:

# migrations.rake
namespace :deploy do
  task :migrate do
    on roles(:app) do
        symfony_console('doctrine:migrations:migrate', '--no-interaction')
    end
  end
end

As per your advice, yet still it is not finding this command. I also tried the "invoke" way, but that gives me the same result.

Caused by:
NoMethodError: undefined method `symfony_console' for #<SSHKit::Backend::Netssh:0x00007fcbe091f358>

I am on version 2.0.0. Could there be a problem after all?

from symfony.

gido avatar gido commented on July 22, 2024

Thanks for the reply. I used invoke and it work.

I wasn't aware about the role requirement (but it's a good thing to specify it in all case ;-)). I will update my recipes and try with this change.

from symfony.

danibram avatar danibram commented on July 22, 2024

Have same issue here, invoke save my life! thanks!

# OSX Sierra
# ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
# Capistrano Version: 3.8.1 (Rake Version: 12.0.0)

GEM
  remote: https://rubygems.org/
  specs:
    airbrussh (1.2.0)
      sshkit (>= 1.6.1, != 1.7.0)
    capistrano (3.8.1)
      airbrussh (>= 1.0.0)
      i18n
      rake (>= 10.0.0)
      sshkit (>= 1.9.0)
    capistrano-composer (0.0.6)
      capistrano (>= 3.0.0.pre)
    capistrano-file-permissions (0.1.1)
      capistrano (~> 3.1)
    capistrano-symfony (0.4.0)
      capistrano (~> 3.1)
      capistrano-composer (~> 0.0.3)
      capistrano-file-permissions (~> 0.1.0)
    i18n (0.8.1)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (4.1.0)
    rake (12.0.0)
    sshkit (1.13.1)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)

PLATFORMS
  ruby

DEPENDENCIES
  capistrano
  capistrano-composer
  capistrano-file-permissions
  capistrano-symfony
  sshkit

BUNDLED WITH
   1.15.0

from symfony.

gido avatar gido commented on July 22, 2024

@ChristianVermeulen strange. The symfony_console is still here in 2.x.

Do you required the full recipe in your Capfile ?

# Capfile
# ...
require "capistrano/symfony"

from symfony.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.