# Capistrano undefined current\_path error

**URL:** <https://www.ruby-forum.com/t/capistrano-undefined-current-path-error/171862>\
**Category:** Deployment\
**Created:** [July 10, 2009, 11:07am UTC](https://www.ruby-forum.com/t/capistrano-undefined-current-path-error/171862 "2009-07-10T11:07:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [July 10, 2009, 11:07am UTC](https://www.ruby-forum.com/t/capistrano-undefined-current-path-error/171862/1 "2009-07-10T11:07:03Z")

</div>

Hi Guys,

I’ve tried to use capistrano (2.5 or 2.5.8) in my Window to deploy the  
project.

I found the following weird error for not finding current\_path. I have  
no clue why this happened. it seems that the error occurs before my  
tasks is triggered.

c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/var  
iables.rb:122:in `method_missing': undefined local variable or method`current\_p  
ath’ for #Capistrano::Configuration:0x46c6e1c (NameError)  
from ./deploy.rb:86:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:172:in`load\_from\_file’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf  
iguration/loading.rb:89:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:86:in`load’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf  
iguration/loading.rb:86:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:86:in`load’  
from Capfile:1:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:172:in`load\_from\_file’  
… 8 levels…  
from  
c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/  
execute.rb:14:in `execute' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/bin/cap:4 from c:/ruby/bin/cap:19:in`load’  
from c:/ruby/bin/cap:19

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [November 4, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/capistrano-undefined-current-path-error/171862/2 "2009-11-04T15:57:54Z")

</div>

Arthur C. wrote:

> Hi Guys,
> 
> I’ve tried to use capistrano (2.5 or 2.5.8) in my Window to deploy the  
> project.
> 
> I found the following weird error for not finding current\_path. I have  
> no clue why this happened. it seems that the error occurs before my  
> tasks is triggered.
> 
> c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/var  
> iables.rb:122:in `method_missing': undefined local variable or method`current\_p  
> ath’ for #Capistrano::Configuration:0x46c6e1c (NameError)  
> from ./deploy.rb:86:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:172:in`load\_from\_file’  
> from  
> c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf  
> iguration/loading.rb:89:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:86:in`load’  
> from  
> c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf  
> iguration/loading.rb:86:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:86:in`load’  
> from Capfile:1:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/conf iguration/loading.rb:172:in`load\_from\_file’  
> … 8 levels…  
> from  
> c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/  
> execute.rb:14:in `execute' from c:/ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.0/bin/cap:4 from c:/ruby/bin/cap:19:in`load’  
> from c:/ruby/bin/cap:19
> 
> Thanks for your help!

Hi,  
had the same problem, in my case it was a bad error message.  
The problem was in the Capfile.  
Make sure you Capfile has the following:

load ‘deploy’ if respond\_to?(:namespace) # cap2 differentiator  
Dir[‘vendor/plugins/_/recipes/_.rb’].each { |plugin| load(plugin) }  
load ‘config/deploy’

Hope this will help.
