1

I am following this tutorial.

and struck at step 12.

Getting these 4 errors on console:

Uncaught controls.js requires including script.aculo.us' effects.js library<br/>
Uncaught ReferenceError: Effect is not defined<br/>
Uncaught ReferenceError: Prototype is not defined<br/>
Uncaught TypeError: Cannot read property 'bind' of null

1 Answer 1

0

The article is from 2011, using a very old version of Rails.

Rails 4 is not provided with scriptaculous anymore.

You have two options:

  1. download and enable scriptaculous in your Rails application;
  2. adapt scriptaculous' functions to use jquery instead.

It seem it is a valid jQuery code.

Have you included scriptaculous on your application?

If so, can you try this?

Valid jQuery scripts not loading in production mode

Sign up to request clarification or add additional context in comments.

18 Comments

I am using rails 4.2.4 ..so how to adapt jquery code?? I have included all the jquery libraries which were relevant
i have edited the answer. can you check it, please? :)
Yes I have already downloaded scriptaculous file and it is in my folder assets/javascript ..do i need to place it somewhere else also ?? do i need to include that scriptaculous file in my views/layout/application.html.erb ?? or application.js file
you need to add it to your application.js file.
1. move it to your 'vendor/assets/javascripts' folder.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.