2013-11-26 39 views
0

我想部署一個Rails 4應用程序通過github通過Capistrano 2.15.5 Webfaction。起初我安裝Capistrano的3,並收到錯誤,所以我結束了Capistrano的安裝和2.15.5以下webfaction的文檔here試圖部署一個Rails 4應用程序到WebFaction,使用他們的文檔,並在本地得到一個錯誤

我webfaction說話,他們建議我試試老帽2版本,因爲這是他們在做什麼熟悉並且不會更新他們的Capistrano 3的文檔一段時間。

我通過他們的教程的所有適當的步驟獲得,並試圖運行時,我收到了一堆錯誤「帽部署:安裝」或「帽部署:檢查」等

錯誤的引擎收錄, here:(和如下圖所示)

/Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require': cannot load such file -- capistrano/setup (LoadError) 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require' 
    from Capfile:6:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:93:in `instance_eval' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:93:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:180:in `load_from_file' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:89:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `block in load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `each' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `block in load_recipes' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `each' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `load_recipes' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:31:in `execute!' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14:in `execute' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/bin/cap:4:in `<top (required)>' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `<main>' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>' 
galactica% cap deploy:check 
/Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require': cannot load such file -- capistrano/setup (LoadError) 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:152:in `require' 
    from Capfile:6:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:93:in `instance_eval' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:93:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:180:in `load_from_file' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:89:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `block in load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `each' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:86:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `block in load_recipes' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `each' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:65:in `load_recipes' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:31:in `execute!' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14:in `execute' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-2.15.5/bin/cap:4:in `<top (required)>' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `<main>' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/aronoff/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>' 

我試圖尋找到這些文件,但我不能確定真正的問題是什麼,我不知道足夠的紅寶石來解決。我希望你能幫助我。

任何幫助將IMMENSELY讚賞和gittipp'ed! :)

預先感謝您! 〜Josh

回答

0

你在ruby v2.0下使用「gem install」安裝了Capistrano 2嗎?

RVM 2.0.0 創業板安裝Capistrano的「你的版本」

試試這個第一....

+0

嗨宰, 是的,我做到了,我只是用「寶石環境」檢查我的寶石環境,這確實是寶石自己生活的地方,是在這些目錄 創業板的路徑: - /Users/aronoff/.rvm/gems/ruby-2.0.0-p247 - /Users/aronoff/.rvm/gems/[email protected] 所以很奇怪...... – jaronoff

3

我猜你設置你的項目的配置與Capistrano的3,我想設置對於Capistrano 2是不同的。

我不是太熟悉的差異,但你得到的錯誤是cannot load such file -- capistrano/setupthis post約Capistrano的3個引用require 'capistrano/setup'如在Capistrano的3生成Capfile之中。

所以我猜這個文件對於capistrano 2是不存在的。我不知道capistrano 2是否有你可以運行的生成器,並讓它們覆蓋你擁有的文件,但是如果是這樣的話,試試吧?

或嘗試取出該行,看看你是否得到不同的錯誤?或者在您開始設置capistrano 3的位置恢復提交併使用capistrano 2完全啓動配置過程?

+0

我糾正了,(來自推特。)我按照你的步驟,刪除舊文件並添加一個新的gemset,然後運行,重新運行capify,並通過我的舊deploy.rb並添加東西英寸 現在唯一的問題是沒有連接的錯誤,我認爲這是基於我自己的語法... – jaronoff

0

我在使用第2.15.5版部署我的rails 4應用程序時遇到了同樣的錯誤。我做了研究,發現問題在於語法,因爲我從第3章切換到第2章。所以,如果您使用cap v2,只會在capfile中加載命令,並且僅在deploy.rb中使用Require命令。因此,如果您從3切換到2,請記住語法,因爲cap v2和cap v3之間有很多變化。

注意:部署導軌4應用程序2.15.5是穩定的capistrano版本,您可以使用。這裏是指導鏈接工作對我來說:https://gist.github.com/brobertsaz/8660415

相關問題