Tuesday, 15 September 2015

javascript - /assets 404 on javascript_include_tag -



javascript - /assets 404 on javascript_include_tag -

in view:

<script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script> <%= javascript_include_tag "modernizr" %>

inspect element:

<script src="http://code.jquery.com/jquery-1.8.3.js"></script> (error in red):get http://my-server.dev/assets/ 404 (not found) <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script> <script src="/assets/modernizr.js?body=1" type="text/javascript"></script>

i can utilize stylesheet_link_tag without trouble. why javascript tag getting 404?

it depends on app/assets, lib/assets or vendor/assets are. if in doubt, specify total path browser should in.

ref: http://guides.rubyonrails.org/layouts_and_rendering.html

javascript ruby-on-rails

No comments:

Post a Comment