0

In my content/themes/default/views/layouts/default.html.erb file I have these set:

<%= stylesheet_link_tag 'default' %>
<%= javascript_include_tag 'default' %>

those files are in content/themes/default/assets/stylesheets and javascripts respectively. Yet in my browser my site throws a 404 on both /stylesheets/default.css and /javascripts/default.js

Tony
  • 8,681
  • 7
  • 36
  • 55

1 Answers1

0

From the docs https://apidock.com/rails/ActionView/Helpers/AssetTagHelper/javascript_include_tag

Sources may be paths to JavaScript files. Relative paths are assumed to be relative to assets/javascripts, full paths are assumed to be relative to the document root. Relative paths are idiomatic, use absolute paths only when needed.

So as far as I understand from the docs, if you want to include the asset in that manner you sould put in asstes/javascripts. Another option is including it using it's full path as docs suggest.

Joel Blum
  • 7,750
  • 10
  • 41
  • 60