Forum: Rails deployment Capistrano undefined current_path error

F3f27949240208ffe170ff8ba6abe6ea?d=identicon&s=25 Arthur Chan (arthurccube)
on 2009-07-10 11:07
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!
E404316dde3fe4dac068203af03e90db?d=identicon&s=25 Ami Klein (ami)
on 2009-11-04 15:57
Arthur Chan 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.
This topic is locked and can not be replied to.