![Scott Woods Scott Woods](https://entp-lh-avatar-production.s3.amazonaws.com/avatars/919/large.jpg?AWSAccessKeyId=AKIAJ4QBZRZBVMOUBNZA&Expires=2041329871&Signature=Y98tZRFzc1tFTR3q9rT66zcy5UM%3D)
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
-
Pascal Rettig December 4th, 2010 @ 03:42 PM
- State changed from new to open
- Assigned user set to Pascal Rettig
Hi Scott,
Thanks - we'll pull in for 1.0
-Pascal
-
aliyahbrown October 6th, 2018 @ 12:11 AM
A good question indeed, i was thinking about the same of years but never had the courage to ask it from someone.
geometry dash -
Andersen Lab November 15th, 2022 @ 05:13 AM
You've done a really great job. I must admit, I have faced a similar problem, although I have many years in programming (I have been working for a large IT company Andersen for more than 5 years), I have been looking for a solution to this problem for a long time. I visited your GitHub page and your undefined variable solution really helped me. Thank you for writing about this on the Internet and helping people!
-
edwardhammond December 9th, 2022 @ 02:09 AM
I recognize the value of reading this material. I look forward to reading more of your writings from tiny fishing that I find as impressive as this one
-
xeniasn xeniusdy December 24th, 2023 @ 10:45 PM
This diversity ensures that there is Dinosaur Game something for everyone, regardless of age or gaming preference. Players can explore fantastical worlds, solve complex puzzles, or engage in intense Geometry Dash battles, all from the comfort of their homes.
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป