# Jquery works in development but doesn't work when hosted on hostingrails.com

**URL:** <https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537>\
**Category:** Rails\
**Created:** [January 13, 2010, 12:40pm UTC](https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537 "2010-01-13T12:40:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rprateek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@rprateek](https://www.ruby-forum.com/u/rprateek)\
**Post date:** [January 13, 2010, 12:40pm UTC](https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537/1 "2010-01-13T12:40:22Z")

</div>

i am a beginner to rails and this is my first project.

Just tried something with jquery. It works fine in my development  
machine but jquery is not executed in my production page

my site is [http://www.khaire.com/galleries](http://www.khaire.com/galleries)

where photos were supposed to be controlled by jquery

Can someone please tell me what i am doing wrong

---

<div class="post-metadata">

**Author:** ![rprateek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@rprateek](https://www.ruby-forum.com/u/rprateek)\
**Post date:** [January 13, 2010, 12:59pm UTC](https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537/2 "2010-01-13T12:59:06Z")

</div>

On 13 jan, 12:23, rprateek [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i am a beginner to rails and this is my first project.
> 
> Just tried something with jquery. It works fine in my development  
> machine but jquery is not executed in my production page
> 
> my site ishttp://www.khaire.com/galleries
> 
> where photos were supposed to be controlled by jquery
> 
> Can someone please tell me what i am doing wrong

Try loading jQuery first and your gallery library last. If you look in  
your Firebug console, you’ll see the gallery library saying jQuery  
isn’t defined.

Good luck!

---

<div class="post-metadata">

**Author:** ![rprateek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@rprateek](https://www.ruby-forum.com/u/rprateek)\
**Post date:** [January 13, 2010, 1:01pm UTC](https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537/3 "2010-01-13T13:01:27Z")

</div>

On Wed, Jan 13, 2010 at 3:23 AM, rprateek [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 

Here’s the problem with you page:

a) The jQuery library should come before any of its plugin libraries  
and  
you should have seen the errors within Firefox and/or Safari.  
b) The page above consists of 26 error messages and I would recommend  
validating your pages using [http://validator.w3.org](http://validator.w3.org).

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![rprateek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@rprateek](https://www.ruby-forum.com/u/rprateek)\
**Post date:** [January 14, 2010, 9:33am UTC](https://www.ruby-forum.com/t/jquery-works-in-development-but-doesnt-work-when-hosted-on-hostingrails-com/181537/4 "2010-01-14T09:33:05Z")

</div>

Thanks for the input guys
