# Problems of "javascript\_include\_tag", cannot load the js fil

**URL:** <https://www.ruby-forum.com/t/problems-of-javascript-include-tag-cannot-load-the-js-fil/91796>\
**Category:** Rails\
**Created:** [April 12, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/problems-of-javascript-include-tag-cannot-load-the-js-fil/91796 "2007-04-12T12:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [April 12, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/problems-of-javascript-include-tag-cannot-load-the-js-fil/91796/1 "2007-04-12T12:59:15Z")

</div>

Hi all,

I’m trying to use Ext JS with Rails and am wondering how should I  
include it in my application. According to the convention of Rails,  
javascript should be put in /public/javascripts and css should be put  
in /public/stylesheets, then I’m supposed to use  
“javascript\_include\_tag” and “stylesheet\_link\_tag” to load them to my  
page.

This shall be fine for the js and css files I created myself. But for  
third-party lib like Ext JS, its internal mechanism highly depends on  
the relative pathes of all its files (js, css, image, ect.). I think I  
should keep its own hierarchy in some place and pass pass the full  
path relative to my document root to “javascript\_include\_tag”.

So I put them in /vendor/ext, which I thought is the place for third-  
party lib and used “/vendor/ext/ext-all.js” to reference the js file I  
want. But then I received an error in my FireBug said that “no route  
found to match “/vendor/ext/ext-all.js” with  
{:method=\>:get}”. I don’t know why this problem occurs. Did I  
select the wrong place? I also tried to put ext in /public and /app/  
views, but neither of these worked.

How can I solve the problem? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![allen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@allen](https://www.ruby-forum.com/u/allen)\
**Post date:** [April 12, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/problems-of-javascript-include-tag-cannot-load-the-js-fil/91796/2 "2007-04-12T14:53:23Z")

</div>

The only files directly accessible to a web browser are those under the  
public/ directory. Anything else is hidden away and won’t work if you  
try to  
access it. If it needs to be accessible to the browser (js, css, static  
html), it _must_ be in public/.

Jason
