Billy M.
Billy M.

Reputation: 369

Incorrect pathing to include external JS files in Ember project (not sure)

Or at least, I THINK this is what's happening. A contractor and I are doing development in tandem (he in HTML5, and myself in Ember and Rails). He supplies me with the HTML, and I try to render it in Ember. He has created these HTML and JS files that are supposed to render various items on my pages, but for the life of me whatever I do I just cannot get them to do so. When I run my project and try to navigate to the pages, some items render and some simply do not. At this point we are thinking it is a pathing issue to his JS files. Here is the relevant portion of my index.html file :

...

  <body>

    {{content-for 'body'}}


    {{content-for 'body-footer'}}
    ...

    <script src="js/classie.js"></script>

    <script src="js/sidebarEffects.js"></script>

    <script src="js/trackernetworks.js"></script>

    ...

    {{content-for 'body-footer'}}

    ...

    <script src="js/trackernetworks.js"></script>

  </body>

  ...

and these js files are stored in the directory of :

<project root>/public/js

We have a feeling this pathing directive might be wrong. I hope it is, because if it isn't, then I legitimately have no idea why our items won't render. Please help, thanks! I'll also be happy to post any other information that is not here that could possibly lead to a solution.

Upvotes: 0

Views: 47

Answers (1)

Nenovrak
Nenovrak

Reputation: 43

Check the following (depending on OS and browser(s)):

  1. Check the developer console and tools in your browser for any problems loading these resources. This will answer if the resources are loaded or not. If they are, the problem is Javascript-related and not path-related.
  2. Check the access log of the web server for problems loading these resources. Here you might find what the actual path the web server is using to find these resources.
  3. If the path is correct, check the permissions of these files i.e. does the web server has permissions to get these?

Upvotes: 1

Related Questions