# Uploadify is not a function

**URL:** <https://www.ruby-forum.com/t/uploadify-is-not-a-function/176910>\
**Category:** Deployment\
**Created:** [October 8, 2009, 12:48am UTC](https://www.ruby-forum.com/t/uploadify-is-not-a-function/176910 "2009-10-08T00:48:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![td919](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@td919](https://www.ruby-forum.com/u/td919)\
**Post date:** [October 8, 2009, 12:48am UTC](https://www.ruby-forum.com/t/uploadify-is-not-a-function/176910/1 "2009-10-08T00:48:16Z")

</div>

I’ve been trying to get uploadify to work, but can’t. I am following the  
tutorial by John Nunemaker.

Mine seems to be quite basic, but I just can’t figure why it wouldn’t  
work…

In my layouts/application.html.erb

```auto
  <%= javascript_include_tag 'uploadify/jquery-1.3.2.min.js' %>
  <%= javascript_include_tag 'uploadify/jquery.uploadify.v2.1.0.min.js'
%>
  <%= javascript_include_tag 'uploadify/swfobject.js' %>
  <%= javascript_include_tag :defaults %>
```

In my view,

```auto
<%- session_key_name = ActionController::Base.session_options[:key] -%>
<script type="text/javascript">
  $ = jQuery.noConflict();

  $(document).ready(function() {
      $('#upload_files').uploadify({
        'uploader' : '/javascripts/uploadify/uploadify.swf',
        'script' : '/javascripts/uploadify/uploadify.php',
        'multi' : true,
        'scriptData' : {
                          '<%= session_key_name %>' :
encodeURIComponent('<%= u cookies[session_key_name] %>'),
                          'authenticity_token' :
encodeURIComponent('<%= u form_authenticity_token if
protect_against_forgery? %>')
                        }
      });
  });
</script>

<input type="file" name="upload_files" id="upload_files" />
```

When the page is loaded I get the following error in Firebug

```auto
$("#upload_files").uploadify is not a function
```

What gives?

I could really appreciate someone’s help on this.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![td919](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@td919](https://www.ruby-forum.com/u/td919)\
**Post date:** [November 6, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/uploadify-is-not-a-function/176910/2 "2009-11-06T14:26:20Z")

</div>

Make sure the page only imports Jquery only one time.

must appear only once in the whole page (analyse the html code client  
side)  
â€”voodoo

---

<div class="post-metadata">

**Author:** ![td919](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/df705f/32.png) [@td919](https://www.ruby-forum.com/u/td919)\
**Post date:** [December 30, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/uploadify-is-not-a-function/176910/3 "2009-12-30T12:20:44Z")

</div>

island Voodoo wrote:

> Make sure the page only imports Jquery only one time.
> 
> must appear only once in the whole page (analyse the html code client  
> side)  
> â€”voodoo

Hi:

I am facing the same problem and the jquery file has been included only  
once.  
Please suggest.

TIA,  
Priya S.
