Reputation: 2985
I am using a library which contains stylesheets and javascripts in one single folder and each javascript file is referencing another js file using relative path.
If i copy the javascript files to public/javascripts
and the stylesheets to public/stylesheets
, the library functions does not work properly.
Thus, i have to keep all javascripts and css together in one single folder.
My problem is i am not able to call the javascripts and the css using absolute or relative path in my view page.
If i try the following, it does not work because the rails app is not able to locate the jquery.cookie.js file.
<script type="text/javascript" src="../../public/_lib/jquery.cookie.js"></script>
Any help is greatly appreciated :)
Upvotes: 0
Views: 548
Reputation: 160321
If it's in the public folder you should be able to access it normally:
<script type="text/javascript" src="/_lib/jquery.cookie.js"></script>
Upvotes: 1