尝试使用Rails 4应用程序的文档将其部署到WebFaction并在本地获取错误 [英] Trying to deploy a Rails 4 app to WebFaction, using their documentation and getting an error locally

查看:82
本文介绍了尝试使用Rails 4应用程序的文档将其部署到WebFaction并在本地获取错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Capistrano 2.15.5通过github将Rails 4应用程序部署到Webfaction.最初,我安装了Capistrano 3,但出现错误,因此我最终安装了Capistrano 2.15.5,并遵循了webfaction的文档

I am trying to deploy a Rails 4 app via github to Webfaction via Capistrano 2.15.5. Initially I installed Capistrano 3 and was getting errors, so I ended up installing Capistrano 2.15.5 and following webfaction's documentation here:

我与webfaction进行了交谈,他们建议我尝试使用较旧的Cap 2版本,因为这是他们所熟悉的,并且暂时不会更新Capistrano 3的文档.

I spoke with webfaction, and they suggested I try the older Cap 2 version since that's what they're familiar with and wouldn't be updating their documentation for Capistrano 3 for awhile.

我已经完成了其教程中的所有适当步骤,并且在尝试运行"cap deploy:setup"或"cap deploy:check"等时遇到很多错误.

I get through all the appropriate steps in their tutorial, and I get a bunch of errors when trying to run "cap deploy:setup" or "cap deploy:check" etc.

pastebin中的错误,此处 :(如下所示)

Errors in a pastebin, here: (and shown below)

/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>'

我已经尝试调查文件,但是我不确定是什么问题,而且我不知道足够的红宝石来进行故障排除.我希望你能帮助我.

I've tried looking into the files, but I'm unsure really of what the issue is, and I dont know enough ruby to troubleshoot. I was hoping you of you could help me.

任何帮助将不胜感激,而且非常感谢! :)

Any help would be IMMENSELY appreciated and gittipp'ed!! :)

先谢谢您! 〜乔什

推荐答案

我猜您是使用Capistrano 3设置项目配置的,而我认为Capistrano 2的设置是不同的.

I'm guessing you set up your project's configuration with Capistrano 3, and I think the setup for Capistrano 2 is different.

我对差异不太熟悉,但是您遇到的错误是cannot load such file -- capistrano/setup这篇文章关于capistrano 3将require 'capistrano/setup'引用为capistrano 3生成的Capfile.

I'm not too familiar with the differences, but the error you're getting is cannot load such file -- capistrano/setup and this post about capistrano 3 references require 'capistrano/setup' as being in the Capfile that capistrano 3 generates.

因此,我猜测capistrano 2不存在该文件.我不知道capistrano 2是否具有可运行的生成器并让其覆盖您拥有的文件,但是如果存在,请尝试这样做吗?

So I'm guessing that file doesn't exist for capistrano 2. I don't know if capistrano 2 has generators that you could run and let them overwrite the files you have, but if it does, try that?

还是尝试取出该行,看看是否遇到其他错误?还是还原您开始设置capistrano 3的提交并使用capistrano 2完全重新开始配置过程?

Or try taking out that line and see if you get a different error? Or revert the commit(s) where you started setting up capistrano 3 and start the configuration process completely over with capistrano 2?

这篇关于尝试使用Rails 4应用程序的文档将其部署到WebFaction并在本地获取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆