Heroku ActionView :: MissingTemplate(缺少模板wordclouds / index,application / index)

时间:2015-11-07 19:25:01

标签: ruby-on-rails heroku

所以,我正在尝试将我的Rails应用程序部署到Heroku。部署成功很好但是当我导航到Heroku网址时,我看到Rails标准“我们很抱歉,但出了点问题”的消息。

我检查了Heroku日志,并在堆栈跟踪的顶部看到:

ActionView::MissingTemplate (Missing template wordclouds/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
2015-11-07T19:17:23.924582+00:00 app[web.1]:   * "/app/app/views"

我肯定有一个有效的根路由,即wordclouds#index。在我的本地计算机上,此路由和索引视图在开发中呈现完美。 Heroku有什么不同?

此外,我的应用的所有源代码都是on GitHub

2 个答案:

答案 0 :(得分:0)

看起来您需要将文件“index.html.erb”添加到文件夹app / views / wordclouds

答案 1 :(得分:0)

所以问题是val fileContent = sc.textFile("file:///myfile") val dataset = fileContent.map(row => { val explodedRow = row.split(",").map(s => s.toDouble) new LabeledPoint(explodedRow(13), Vectors.dense( Array(explodedRow(10), explodedRow(11), explodedRow(12)) ))}) val algo = new LassoWithSGD().setIntercept(true) val lambda = 0.0 algo.optimizer.setRegParam(lambda) algo.optimizer.setNumIterations(100) algo.optimizer.setStepSize(1.0) val model = algo.run(dataset) 已被初始化为git子模块,而Heroku只是不喜欢它。一旦我删除了子模块,Heroku工作正常。