Capistrano undefined current_path error

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 methodcurrent_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:inload_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:inload’
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:inload’
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:inload_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:inload’
from c:/ruby/bin/cap:19

Thanks for your help!

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 methodcurrent_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:inload_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:inload’
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:inload’
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:inload_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:inload’
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.