Jquery works fine as CDN hosted but fails when download
My app is in Rails 3.2.6 & ruby 1.9.3p0.I ve many css & javascripts file in assets in which one jquery file is CDN hosted.All works fine but when i download this file to app/assets/javascripts/jquery-ui.min.js. it fails(views depends on this jquery doesnot works).
Please provide me some way.
This is my CND hosted JQueryUI file.
        
    <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"  %>
 

My application.html.erb 

    <!DOCTYPE html>
    <html>
    <head>
    <title>Tritinum   <%#= controller.action_name %></title>
    <%= stylesheet_link_tag    "application", :media => "all" %>
    <%= javascript_include_tag "application" %>
    <%#= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" %>
    <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"  %>
    <%= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Droid+Sans:400,700'%>
  
    <%= csrf_meta_tags %>
    </head>
    <body>
    <!-- BEGIN MAIN -->
    
    <section id="main" class="container_16">
    <p class="notice"><%#= notice %></p>
    <p class="alert"><%= alert %></p>
      <div id="user_nav">
    <% if user_signed_in? %>
    <!-- Signed in as <%#= current_user.email %>. Not you?
    <%#= link_to "Sign out", destroy_user_session_path, method: :delete %>
    -->
  
    <% else %>
    <!--    <%#= link_to "Sign up", new_user_registration_path %>
    -->
    <%= link_to "Sign in", new_user_session_path %>
    <% end -%>
    </div>

    <%= yield %>


     <!-- BEGIN FOOTER -->
     <section class="footer">
			
			<p>
				<span class="left">�Copyright 2012 - All rights reserved.          </span>
				<span class="right">Web Scanner v1.0 - Product By <a  href="http://www.torridnetworks.com">Torrid Networks Pvt. Ltd.</a></span>
            </p>
            
			<div class="clear"></div><!-- CLEAR BOTH -->
        
        </section><!-- end section .footer -->
        <!-- END FOOTER -->
      
        	</section><!-- end section #main -->
       <!-- END MAIN -->
    
        <!-- BEGIN LOADING OVERLAY
          <div id="loading_overlay">
		<div class="loading_message round_bottom">
			<%#= image_tag "loading.gif" %>
		</div>
	</div> 
      -->
 
	<!-- END LOADING OVERLAY -->
  
  

     </body>
       </html>


My application.js


    // This is a manifest file that'll be compiled into application.js, which will include all the files
    // listed below.
    //
    // Any JavaScript/Coffee file within this directory, lib/assets/javascripts,  vendor/assets/javascripts,
    // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
    //
    // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
    // the compiled file.
    //
    // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
    // GO AFTER THE REQUIRES BELOW.
    //
    //
    //= require jquery_ujs
    //= require_tree .
    function remove_fields(link) {
        $(link).previous("input[type=hidden]").value = "1";
        $(link).up(".fields").hide();
    }
    jQuery(function($) {
    // when the #region_id field changes
    $("#finding_category_id").live('change', function() {
    // make a POST call and replace the content
    var category = $('select#finding_category_id :selected').val();
    if(category == "") category="0";
    jQuery.get('/finding_templates/for_categoryid/' + category, function(data){
        $("#finding").html(data);
    })
    return false;
    });
    })

I am working in development environment. 



  
Jquery works fine as CDN hosted but fails when download
===

My app is in Rails 3.2.6 & ruby 1.9.3p0.I ve many css & javascripts file in assets in which one jquery file is CDN hosted.All works fine but when i download this file to app/assets/javascripts/jquery-ui.min.js. it fails(views depends on this jquery doesnot works).
Please provide me some way.
This is my CND hosted JQueryUI file.
        
    <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"  %>
 

My application.html.erb 

    <!DOCTYPE html>
    <html>
    <head>
    <title>Tritinum   <%#= controller.action_name %></title>
    <%= stylesheet_link_tag    "application", :media => "all" %>
    <%= javascript_include_tag "application" %>
    <%#= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" %>
    <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"  %>
    <%= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Droid+Sans:400,700'%>
  
    <%= csrf_meta_tags %>
    </head>
    <body>
    <!-- BEGIN MAIN -->
    
    <section id="main" class="container_16">
    <p class="notice"><%#= notice %></p>
    <p class="alert"><%= alert %></p>
      <div id="user_nav">
    <% if user_signed_in? %>
    <!-- Signed in as <%#= current_user.email %>. Not you?
    <%#= link_to "Sign out", destroy_user_session_path, method: :delete %>
    -->
  
    <% else %>
    <!--    <%#= link_to "Sign up", new_user_registration_path %>
    -->
    <%= link_to "Sign in", new_user_session_path %>
    <% end -%>
    </div>

    <%= yield %>


     <!-- BEGIN FOOTER -->
     <section class="footer">
			
			<p>
				<span class="left">�Copyright 2012 - All rights reserved.          </span>
				<span class="right">Web Scanner v1.0 - Product By <a  href="http://www.torridnetworks.com">Torrid Networks Pvt. Ltd.</a></span>
            </p>
            
			<div class="clear"></div><!-- CLEAR BOTH -->
        
        </section><!-- end section .footer -->
        <!-- END FOOTER -->
      
        	</section><!-- end section #main -->
       <!-- END MAIN -->
    
        <!-- BEGIN LOADING OVERLAY
          <div id="loading_overlay">
		<div class="loading_message round_bottom">
			<%#= image_tag "loading.gif" %>
		</div>
	</div> 
      -->
 
	<!-- END LOADING OVERLAY -->
  
  

     </body>
       </html>


My application.js


    // This is a manifest file that'll be compiled into application.js, which will include all the files
    // listed below.
    //
    // Any JavaScript/Coffee file within this directory, lib/assets/javascripts,  vendor/assets/javascripts,
    // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
    //
    // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
    // the compiled file.
    //
    // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
    // GO AFTER THE REQUIRES BELOW.
    //
    //
    //= require jquery_ujs
    //= require_tree .
    function remove_fields(link) {
        $(link).previous("input[type=hidden]").value = "1";
        $(link).up(".fields").hide();
    }
    jQuery(function($) {
    // when the #region_id field changes
    $("#finding_category_id").live('change', function() {
    // make a POST call and replace the content
    var category = $('select#finding_category_id :selected').val();
    if(category == "") category="0";
    jQuery.get('/finding_templates/for_categoryid/' + category, function(data){
        $("#finding").html(data);
    })
    return false;
    });
    })

I am working in development environment. 



  