# Uncaught exception: controls.js requires including script.ac

**URL:** <https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975>\
**Category:** Rails\
**Created:** [November 24, 2008, 8:34am UTC](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975 "2008-11-24T08:34:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 24, 2008, 8:34am UTC](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975/1 "2008-11-24T08:34:59Z")

</div>

hi friends…

Ajax problem…  
please help me.  
Ajax using delete the record

Browser Mozilla

my controller:

def delete  
Book.find(params[:id]).destroy  
redirect\_to :action =\>‘book’  
end

my view:

\<%= link\_to\_remote (image\_tag(“…/images/delete\_bt.gif”, :border =\> 0)),  
:url =\>{  
:controller=\>“book”,  
:action =\> ‘delete’,  
:id =\> s.id},  
:update=\>“book#{s.id}”,  
:loading=\>“status(‘book#{s.id}’)”  
%\>

Error…  
uncaught exception: controls.js requires including [script.aculo.us](http://script.aculo.us)’  
effects.js library

Line 0

---

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 24, 2008, 8:45am UTC](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975/2 "2008-11-24T08:45:44Z")

</div>

Looks to me like you need to include the [script.aculo.us](http://script.aculo.us) library,  
which is found in your public/javascripts/ folder. However, add this  
to the of your application layout:

\<%= javascript\_include\_tag :defaults %\>

Then make sure that everything is in the javascripts folder.

On Nov 24, 1:34 am, Smarty 2k [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![smartee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@smartee](https://www.ruby-forum.com/u/smartee)\
**Post date:** [November 24, 2008, 10:06am UTC](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975/3 "2008-11-24T10:06:27Z")

</div>

forgot it…  
Thanks a lot friend…

Now working fine…
