3
votes

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.Yuri
Thanks Yuri for the hint. You were right !Marine

1 Answers

4
votes

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