Problems of "javascript_include_tag", cannot load the js fil

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

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.

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/.