Domanda

After running a cap deploy, I'm getting an error when navigating to my site on the client:

Uncaught SyntaxError: Unexpected token '<' application-[hash here].js line 1

When I look at the file "application.js" on the client, it simply shows me a rendered version of my application.html.erb. The first line of that file is naturally <!DOCTYPE html> so it makes sense that it would get that error at line 1. But why would html be getting sent over in place of my javascript? I ran this same deploy several times earlier today and it worked fine.

I understand there are all sorts of variables here that could be causing this issue, but I guess what I'm looking for are just thoughts on what could possibly be causing the issue.

Any thoughts?

È stato utile?

Soluzione

If anyone who happens to run into this error in the future, it turned out that the issue I was having was actually with my nginx.conf file. Had nothing to do with rails.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top