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 ??
Update
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 http://example.com/assets/application.js // 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
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
source share
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 => x.id);
Once I changed this to an anonymous function:
.map(function(x) { return x.id; });
the error is gone.
source share