Heroku ActionView :: Template :: Error eof(undefined)在/app/app/assets/javascripts/application.js中 [英] Heroku ActionView::Template::Error eof (undefined) in /app/app/assets/javascripts/application.js

查看:118
本文介绍了Heroku ActionView :: Template :: Error eof(undefined)在/app/app/assets/javascripts/application.js中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的应用程序部署到了Heroku。
我在日志中有这个错误:

  ActionView :: Template :: Error(Unexpected token:eof未定义)
(在/app/app/assets/javascripts/application.js)):
:3:< head>
:4:< title> wkkin< / title>
:5:<%= stylesheet_link_tagapplication%>
:GET xxx.herokuapp.com/users/2/edit dyno = web.1 queue = 0 wait = 0ms service = 1
292ms status = 500 bytes = 728
:6:< ;%= javascript_include_tagapplication%>
:7:<%= csrf_meta_tags%>
:8:< / head>
:9:< body>
:app / views / layouts / application.html.erb:6:in _app_views_layouts_application_html_erb___1096119453842232088_43006600'



<

  // =需要jquery 
// =需要jquery_ujs
// = require_tree。

我的文件夹中有三个文件app / assets / javascripts /


  • application.js

  • form.js

  • users.js.coffee



在application.rb中:config.assets.initialize_on_precompile = false
在production.rb中:config.assets.compile = true p>

有什么想法?
感谢您的帮助。

解决方案

这通常意味着您在某个.js文件中遗漏了关闭}不只是application.js。我会检查。


I deployed my app to Heroku. I am having this error in the log :

    ActionView::Template::Error (Unexpected token: eof (undefined)
(in /app/app/assets/javascripts/application.js)):
:     3: <head>
:     4:   <title>wkkin</title>
:     5:   <%= stylesheet_link_tag    "application" %>
: GET xxx.herokuapp.com/users/2/edit dyno=web.1 queue=0 wait=0ms service=1
292ms status=500 bytes=728
:     6:   <%= javascript_include_tag "application" %>
:     7:   <%= csrf_meta_tags %>
:     8: </head>
:     9: <body>
:   app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___1096119453842232088_43006600'

My application.js looks like :

//= require jquery
//= require jquery_ujs
//= require_tree .

I have three files in my folder app/assets/javascripts/

  • application.js
  • form.js
  • users.js.coffee

in application.rb : config.assets.initialize_on_precompile = false in production.rb : config.assets.compile = true

Any idea ? Thanks for your help.

解决方案

This often means you have a missing closing } in one of your .js files not just application.js. I would check that.

这篇关于Heroku ActionView :: Template :: Error eof(undefined)在/app/app/assets/javascripts/application.js中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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