#117 open
Scott Woods

undefined variable webiva_modules when deploying without modules

Reported by Scott Woods | December 3rd, 2010 @ 06:05 AM

When we tried to deploy with the stock script (no modules defined), we got the following error:

  * executing "find /var/www/domains/webiva.staging.westarete.com/releases/20101203104758/public/images /var/www/domains/webiva.staging.westarete.com/releases/20101203104758/public/stylesheets /var/www/domains/webiva.staging.westarete.com/releases/20101203104758/public/javascripts -exec touch -t 201012031048.11 {} ';'; true"
    servers: ["staging.westarete.com"]
    [staging.westarete.com] executing command
    command finished
  * executing `webiva:modules_install'
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/domains/webiva.staging.westarete.com/releases/20101203104758; true"
    servers: ["staging.westarete.com"]
    [staging.westarete.com] executing command
    command finished
/Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:188:in `method_missing': undefined local variable or method `webiva_modules' for #<Capistrano::Configuration::Namespaces::Namespace:0x101abc348> (NameError)
    from ./config/base_deploy.rb:49:in `load'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly_without_callbacks'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:89:in `execute_task'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:186:in `send'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:186:in `method_missing'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:104:in `modules_install'
    from ./config/base_deploy.rb:29:in `load'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:56:in `transaction'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:186:in `send'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:186:in `method_missing'
    from ./config/base_deploy.rb:27:in `load'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly_without_callbacks'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:89:in `execute_task'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:46:in `execute_requested_actions_without_help'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:45:in `each'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions_without_help'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/help.rb:19:in `execute_requested_actions'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:34:in `execute!'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:14:in `execute'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/gems/capistrano-2.5.19/bin/cap:4
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/bin/cap:19:in `load'
    from /Users/woods/.rvm/gems/ree-1.8.7-2010.01@webiva/bin/cap:19

We contributed a fix that properly initializes the capistrano variable to an empty array:

https://github.com/westarete/Webiva/commit/559e226c4a8c3335fba51a96...

Will send a pull request shortly.

Thanks!
Scott

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages