2

我正在使用 capyfony + symfony2。

帽部署

/var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:183:in `find_file_in_load_path': no such file to load --  (LoadError)
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:171:in `load_from_file'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `block in load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
    from Capfile:3:in `load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:93:in `load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `block in load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `each'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `load_recipes'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:31:in `execute!'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:14:in `execute'
    from /var/lib/gems/1.9.1/gems/capistrano-2.13.4/bin/cap:4:in `<top (required)>'
    from /usr/local/bin/cap:19:in `load'
    from /usr/local/bin/cap:19:in `<main>'
4

1 回答 1

5

我遇到了同样的问题。通过调查,我试图提出:

puts Gem.find_files('symfony2.rb')

在我的Capfile文件中,如https://github.com/everzet/capifony/issues/190所述。然而,它什么也没返回。我想我想念这个文件。我怎么才能得到它?

编辑 :

经过更多调查,我终于找到了解决方案。

我为 Capifony 2.1.16 使用了 Capfile。似乎新版本的 Capifony (2.2) 需要对 Capfile 文件进行一些更改。使用以下它应该可以工作:

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) }
load Gem.find_files('capifony_symfony2.rb').last.to_s
load 'app/config/deploy'
于 2012-10-25T16:05:21.777 回答