# Change default directory of javascripts?

**URL:** <https://www.ruby-forum.com/t/change-default-directory-of-javascripts/122415>\
**Category:** Rails\
**Created:** [December 7, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/change-default-directory-of-javascripts/122415 "2007-12-07T13:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sun](https://www.ruby-forum.com/u/sun)\
**Post date:** [December 7, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/change-default-directory-of-javascripts/122415/1 "2007-12-07T13:01:21Z")

</div>

Hi,  
I am using overlibmws.js library to add some dynamic effect to my  
rails  
web pages. But the server can not find the gif files that required by  
javascripts. It always tries to search in , for example  
,"/experiment/index/" this directory. I changed the  
“OLbubbleImageDir”  
setting to “public/images”, which is the directory I put those gif  
files,  
but does not work. Server gives a 404 error.

I 'd like to know how to change the deault searching directory of  
javascripts from “…/index” to “public/images” or other place in  
rails  
project. I do not know anything about javascripts, except the syntax  
looks  
similiar to java.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![sun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@sun](https://www.ruby-forum.com/u/sun)\
**Post date:** [December 7, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/change-default-directory-of-javascripts/122415/2 "2007-12-07T14:55:48Z")

</div>

Solved. Using “images/” set the variable “OLbubbleImageDir” gives  
correct answer.
