# Ajax request executing well on localhost but not on server

**URL:** <https://www.ruby-forum.com/t/ajax-request-executing-well-on-localhost-but-not-on-server/164714>\
**Category:** Rails\
**Created:** [April 4, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/ajax-request-executing-well-on-localhost-but-not-on-server/164714 "2009-04-04T17:38:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [April 4, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/ajax-request-executing-well-on-localhost-but-not-on-server/164714/1 "2009-04-04T17:38:20Z")

</div>

I have an Ajax request from a form

it executes well in dev n locahost… (mongrel) and on local Apache  
server ([http://aelmat.local](http://aelmat.local))  
but it’s not executing when running on remote host server

what could be the issue ? where should I look for ?

erwin

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [April 4, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/ajax-request-executing-well-on-localhost-but-not-on-server/164714/2 "2009-04-04T18:12:55Z")

</div>

On Apr 4, 4:37 pm, Erwin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> but it’s not executing when running on remote host server
> 
> what could be the issue ? where should I look for ?

In what way is it not working ? (the response contains an error, the  
request is garbled, the request never makes it to rails, it never  
makes a request at all, etc. )

Fred

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [April 4, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/ajax-request-executing-well-on-localhost-but-not-on-server/164714/3 "2009-04-04T19:33:12Z")

</div>

sorry, Fred , I was a little bit lost  
I have 2 ajax forms almost identical, one is running well , not the  
second one…and I was looking into the wrong development log…  
(deployment is sometimes a little bit confusing, even with Capistrano  
( different settings… staging, production, … )

finally I got the right log… & discover the error … a "  
scoped\_by\_ " =\> used in 2.3.2 locally …  
my ‘staging’ environment.rb was still using 2.2.2 !!

thanks for asking questions that make me thinking a little bit  
more …

erwin
