部署到Heroku时,在Rails应用程序中丢失模板/创建POST操作 [英] Missing Template in Rails app on /create POST action when deployed to Heroku

查看:100
本文介绍了部署到Heroku时,在Rails应用程序中丢失模板/创建POST操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上使用Rails应用程序时遇到了一些非常奇怪的行为。基本上,我在一个控制器中做了一个非常简单的职位,并且由于缺少模板例外而失败。对于我的生活,我无法弄清楚为什么这个内置的控制器操作会期望一个模板(??)。奇怪的是,这在本地工作得很好 - 只在部署的应用程序上发生异常。这是我从Heroku日志中得到的所有信息。

I'm experience some very strange behavior with a Rails app on Heroku. Basically, I'm doing a very straightforward post in a controller and it's failing with a missing template exception. For the life of me I can't figure out why this built-in controller action would expect a template (??). The strange thing is this works just fine locally--the exception only occurs on the deployed app. This is all I'm getting back from the Heroku logs.

Started POST "/camps" for ............ at 2011-11-17 23:27:47 +0000
ActionView::MissingTemplate (Missing template camps/create, application/create with
{:handlers=>[:erb, :builder, :haml], :formats=>[:html], :locale=>[:en, :en]}. Searched in:
* "/app/app/views"
* "/app/vendor/bundle/ruby/1.9.1/gems/kaminari-0.12.4/app/views"
* "/app/vendor/bundle/ruby/1.9.1/gems/devise_invitable-0.5.7/app/views"
* "/app/vendor/bundle/ruby/1.9.1/gems/devise-1.4.9/app/views"
):
cache: [POST /camps] invalidate, pass


推荐答案

它不应该渲染任何东西?

It's not supposed to render anything?

您是否有 render:nothing =>真正在你的行动?

这篇关于部署到Heroku时,在Rails应用程序中丢失模板/创建POST操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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