Rails fix: make sure <%= javascript_include_tag \"application\" %> is before any script loading so that jquery gets loaded first.
<%= javascript_include_tag \"application\" %>
your
needs to be called before jquery ui < script > tags.
Should appear like this:
<-- put me here -->