ruby-on-rails - Capistrano 从旧版本中给出错误。 ActionView::MissingTemplate

标签 ruby-on-rails capistrano unicorn

我已经使用 capistrano 部署了我的应用程序在 AWS , 与 nginxunicorn .当我打开我的主页时,它是空的。这是我的unicorn日志

Started GET "/" for 111.111.111.111 at 2014-03-10 12:50:02 +0000
Processing by StaticController#index as HTML
Completed 500 Internal Server Error in 236ms

ActionView::MissingTemplate (Missing template static/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee, :haml]}. Searched in:
  * "/home/deployer/apps/my-app/releases/20140310084512/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/twitter-bootstrap-rails-2.2.8/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/glimpse-redis-1.1.0/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/glimpse-git-1.0.1/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/glimpse-0.0.5/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/kaminari-0.15.1/app/views"
  * "/home/deployer/apps/my-app/shared/bundle/ruby/1.9.1/gems/devise-3.2.3/app/views"
  * "/home/deployer/apps/my-app/releases/20140310124541"
  * "/"
):
  app/controllers/static_controller.rb:8:in `index'

我的最新版本是 20140310124541 ,但缺少模板错误来自以前的版本 20140310084512 .可能是什么问题。 current文件夹符号链接(symbolic link)已正确创建。

最佳答案

您需要确保重新启动 nginx/unicorn。一旦程序在符号链接(symbolic link)中查找文件夹/文件,它将指向目标。因此,当 capistrano 指向最新版本时,nginx 仍在查看现在很可能已删除的旧目标。

确保您已重新启动任务设置,如下所示:https://github.com/sosedoff/capistrano-unicorn

关于ruby-on-rails - Capistrano 从旧版本中给出错误。 ActionView::MissingTemplate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22301048/

相关文章:

ruby-on-rails - Capistrano和Bundler问题- bundle : not found

ruby-on-rails - bundler 错误地尝试在生产中安装 "development"和 "test"组 gems

ruby - 用 unicorn 产生多个 worker

ruby-on-rails - Ubuntu、Ruby、Ruby on Rails 安装问题(无法访问 localhost :3000)

ruby-on-rails - 如何将 arbre 代码干燥成可重用的组件?

ruby-on-rails - Ruby on Rails *功能*部署的最佳实践?

ruby-on-rails - 如果 Unicorn 启动新进程失败,Capistrano 能通知我吗

ruby-on-rails - Mongoid + ActiveModel 验证 + I18n,没有正确翻译属性

ruby-on-rails - 有没有类似 Ruby On Rails 的 Xampp?

deployment - 使用 Capistrano 部署时如何升级 Wordpress 和插件?