Comments (6)
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.
Enclosing the symfony:console command in a on roles clause (which is the recommended way) solve the issue.
I'm closing it.
from symfony.
@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.
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.
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.
@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)
- Error task symfony:clear_controllers HOT 2
- NoMethodError: undefined method `symfony_console' HOT 2
- Website unreachable during deploy HOT 3
- Error: `execute' should be wrapped in an `on'
- Task for running (and enforcing passed) tests HOT 3
- v1.0 tasks don't run on Symfony 2.8 HOT 1
- Cache warmup SSH commands being executed multiple times per host HOT 2
- Capistrano roles ignored for symfony_command HOT 1
- Symfony messenger stop workers HOT 1
- Capfile: cannot load such file -- capistrano/symfony HOT 1
- Make :symfony_console_path executable HOT 2
- Task symfony:set_permissions invokes task deploy:set_permissions:* for each server in "release_roles :all"
- Release a stable release? HOT 8
- Symfony 4 directory structure HOT 15
- Symfony Flex?
- Cache warmup error HOT 1
- Uploads linked dirs
- symfony_deploy_roles in place of symfony_roles HOT 2
- exclude folders before deploy from local !?
- PHP Errors not displaying in the log HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony.