Javascript UI isn't working

This problem is caused by my acknowledge of English and jQuery or maybe something else. I was using tutorial for jQuery - .

In my application.erb.html:

<%= javascript_include_tag :defaults, "rails.validations", "rails.validations.custom" %>
<%=  javascript_include_tag  ""%>
<%=javascript_include_tag  ""%>

I think I didn't included some library because my page in view.

But my page looks like:

    Say something!


My generator didn't created js files,so I created file rails.validations.custom.js and added code from GitHub:

   ClientSideValidations.validators.local['email'] = function(element, options) {
    // Your validator code goes in here
      if (!/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i.test(element.val())) {
    // When the value fails to pass validation you need to return the error message.
    // It can be derived from validator.message
    return options.message;


The comments thread for the question is getting long, so I'm going to create an answer.

We have established by looking at the firebug console that two of your JavaScript files are not where your application expects them to be:


What you need to do is either move those two files to the /assets directory, or modify the file path to point to the location where those two files actually reside.

I'm not a rails guy, but here is my guess about how you might do that:

<%= javascript_include_tag :defaults, "/js/rails.validations", "/js/rails.validations.custom" %>

I think this would look for the files in /assets/js directory, but obviously you would need to modify the path to point at the actual location of you files. I'm sure a rails developer will chime in and tell me if I've got the wrong end of the stick!

Need Your Help

SwipeRefreshLayout refresh animation doesn't stop

android swiperefreshlayout

I've implemented a fragment which has a SwipeRefreshLayout as content view. Refresh animation is triggered at onRefresh but it never stops even if setRefreshing is set to false after retrieving the...