Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug after 0.4.0 version undefined local variable or method `symfony_cache_path' #63

Closed
folliked opened this issue Jun 10, 2016 · 10 comments

Comments

@folliked
Copy link

folliked commented Jun 10, 2016

00:00 deploy:symlink:linked_dirs
01 mkdir -p /var/www/test/myproject/releases/20160610144818/app
** Invoke symfony:create_cache_dir (first_time)
** Execute symfony:create_cache_dir
cap aborted!
NameError: undefined local variable or method symfony_cache_path' for #<SSHKit::Backend::Printer:0x007fb6b29277a8> /Library/Ruby/Gems/2.0.0/gems/capistrano-symfony-1.0.0.rc2/lib/capistrano/tasks/symfony.rake:52:inblock (4 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:80:in within' /Library/Ruby/Gems/2.0.0/gems/capistrano-symfony-1.0.0.rc2/lib/capistrano/tasks/symfony.rake:51:inblock (3 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:29:in instance_exec' /Library/Ruby/Gems/2.0.0/gems/sshkit-1.10.0/lib/sshkit/backends/abstract.rb:29:inrun'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.10.0/lib/sshkit/runners/parallel.rb:12:in block (2 levels) in execute' Tasks: TOP => symfony:create_cache_dir The deploy has failed with an error: undefined local variable or methodsymfony_cache_path' for #SSHKit::Backend::Printer:0x007fb6b29277a8
** Invoke deploy:failed (first_time)
** Execute deploy:failed

I don't know what is missing ... i use capistrano 3.5

@folliked folliked changed the title bug after 0.4.0 undefined local variable or method `symfony_cache_path' bug after 0.4.0 version undefined local variable or method `symfony_cache_path' Jun 10, 2016
@qbarbosa
Copy link

qbarbosa commented Jun 21, 2016

I have exactly the same problem here!

Capistrano v3.4, capistrano/symfony v1.0.0.rc2

** Execute symfony:create_cache_dir
cap aborted!
NameError: undefined local variable or method `symfony_cache_path' for #<SSHKit::Backend::Printer:0x007fb6a54d93e8>
/Library/Ruby/Gems/2.0.0/gems/capistrano-symfony-1.0.0.rc2/lib/capistrano/tasks/symfony.rake:52:in `block (4 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:85:in `within'
/Library/Ruby/Gems/2.0.0/gems/capistrano-symfony-1.0.0.rc2/lib/capistrano/tasks/symfony.rake:51:in `block (3 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.11.1/lib/sshkit/backends/abstract.rb:29:in `run'
/Library/Ruby/Gems/2.0.0/gems/sshkit-1.11.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => symfony:create_cache_dir
The deploy has failed with an error: undefined local variable or method `symfony_cache_path' for #<SSHKit::Backend::Printer:0x007fb6a54d93e8>
** Invoke deploy:failed (first_time)
** Execute deploy:failed

@folliked have you found how to fix this?

@qbarbosa
Copy link

In the file lib/capistrano/tasks/symfony.rake line 53

Shouldn't we replace this

if test "[ -d #{symfony_cache_path} ]"
          execute :rm, "-rf", symfony_cache_path

with this

if test "[ -d #{symfony_cache_path} ]"
          execute :rm, "-rf", fetch(:symfony_cache_path)

?

@folliked
Copy link
Author

i think, it doesn't load DSL libs of capistrano/symfony

@nescim
Copy link

nescim commented Dec 19, 2016

Did anybody find a workaround? @folliked seems to be right since the offending variable is defined in the DSL folder but I don't have enough experience with Capistrano to figure out how to include it manually and even google does not yield anythiong useful.

@jbgomond
Copy link

Same problem for me and "symfony_console" is not defined too ...

Ruby 2.3.3, Capistrano 3.7.1 and capistrano/symfony 1.0.0-rc2

Could you look @peterjmit ? I don't have enough experience with Ruby and Capistrano ...

@pbowyer
Copy link

pbowyer commented Feb 16, 2017

Having recreated my Vagrant box after running for a year, I now have this error too.

(Backtrace restricted to imported tasks)
cap aborted!
NameError: undefined local variable or method `symfony_cache_path' for #<SSHKit::Backend::Printer:0x000000015ad308>

Tasks: TOP => symfony:create_cache_dir
(See full trace by running task with --trace)
The deploy has failed with an error: undefined local variable or method `symfony_cache_path' for #<SSHKit::Backend::Printer:0x000000015ad308>

@arjanvdbos
Copy link

Same issue here, both undefined local variable or method `symfony_cache_path' and 'symfony_console'. It seems that the DSL file is parsed (putting gibberish in it results in an parse error), but not actually used/available.

  • Ruby 2.5.1
  • Capistrano 3.10.2
  • capistrano/symfony 1.0.0-rc3

Nobody found a workaround yet? I don't have a lot of experience with Ruby in order to do proper debugging.

@arjanvdbos
Copy link

We managed to 'solve' the issue. While we were changing stuff, we continuously tested with the --dry-run option. An that's exactly the issue; it looks like that this module breaks in dry-run-mode, the normal run-mode is working like a charm!

@Nyholm
Copy link
Collaborator

Nyholm commented Sep 6, 2018

Closing this due inactivity. Feel free to ping me if this is still an issue.

@Nyholm Nyholm closed this as completed Sep 6, 2018
@HeahDude
Copy link

HeahDude commented Jun 6, 2022

I ran into this issue today. Trying to use --dry-run seems broken, which is sad as it prevents proper debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants