Action view :: template :: error (Unexpected token: operator (<))

im getting a problem with my deployment in heroku! I just created a Test app with a cedar stack, pushed my app and I have this problem (log)

←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m ActionView::Template::Error (Unexpected token: operator (<)
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m   (in /app/app/assets/javascripts/application.js)):
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     3: <head>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     4:   <title>Test</title>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     5:   <%= stylesheet_link_tag    "application" %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     6:   <%= javascript_include_tag "application" %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     7:   <%= csrf_meta_tags %>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     8: </head>
←[32m2012-03-24T15:10:56+00:00 app[web.1]:←[0m     9: <body>


Any idea ??


My application.js file

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from
// It not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require_tree .



source share

2 answers

I just ran into this problem and the trick was that there was a line of conflict left between the server and my localhost. Everything was going fine in my localhost, but I think it was due to some kind of cache or something. Anyway, I opened the .js app and removed the lines with <HEAD ...

I give it here for logging the problem and a possible solution



I ran into this error and it took a while to figure out which file the manifest referenced was the culprit. Once I figured out which file was causing the error, looking for '>' brought up multiple lines, but I was lucky and quickly zeroed out in the map function that used the operator =>


.map(x =>;

Once I changed this to an anonymous function:

.map(function(x) { return; });

the error is gone.



All Articles