Heroku ActionView::Template::Error eof (undefined) in /app/app/assets/javascripts/application.js

那年仲夏 提交于 2019-12-09 20:09:39

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/8655732/heroku-actionviewtemplateerror-eof-undefined-in-app-app-assets-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!