# Re: 302 found, I dont know how this is happen even i have the respective file in server

**URL:** <https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199>\
**Category:** Rails\
**Created:** [March 28, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199 "2008-03-28T17:26:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gokulamurthy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/858c86/32.png) [@gokulamurthy](https://www.ruby-forum.com/u/gokulamurthy)\
**Post date:** [March 28, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199/1 "2008-03-28T17:26:04Z")

</div>

hey Mark,

```
    Thanks a lot, i will try with tat.

    can send your suggestions for this, how to disable the 302 found

```

message. Following is the error i am facing…

Processing DesignerController#index (for 203.199.223.209 at 2008-03-28  
09:18:14) [GET]  
Session ID: c6f87f53074f58858b7303dc6f24ac6e  
Parameters: {“action”=\>“index”, “controller”=\>“designer”}  
Redirected to [http://c21.broadspire.net/](http://c21.broadspire.net/)  
Completed in 0.00038 (2644 reqs/sec) | DB: 0.00000 (0%) | 302 Found [  
[http://c21.broadspire.net/designer/index/](http://c21.broadspire.net/designer/index/)]

but i dont know why this is redirecting. i am accessing this  
[http://c21.broadspire.net/designer/index/](http://c21.broadspire.net/designer/index/) URL from  
[http://c21.broadspire.net/](http://c21.broadspire.net/) ( after login only )

I dont know why this is redircecting again login page…

Please help me out of this issue…

Thanks

P.Gokula murthy

> **[Class RailsThinker \< Rails](http://railsthinker.blogspot.com/)**
>
> Single Table inheritance from Rails Core.

On Fri, Mar 28, 2008 at 9:33 PM, Mark B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![gokulamurthy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/858c86/32.png) [@gokulamurthy](https://www.ruby-forum.com/u/gokulamurthy)\
**Post date:** [March 29, 2008, 1:16pm UTC](https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199/2 "2008-03-29T13:16:28Z")

</div>

On 28 Mar 2008, at 16:25, gokul murthy wrote:

> Parameters: {“action”=\>“index”, “controller”=\>“designer”}  
> Redirected to [http://c21.broadspire.net/](http://c21.broadspire.net/)  
> Completed in 0.00038 (2644 reqs/sec) | DB: 0.00000 (0%) | 302 Found [[http://c21.broadspire.net/designer/index/](http://c21.broadspire.net/designer/index/)  
> ]

Well you’re probably calling redirect\_to somewhere. Put breakpoints  
wherever yo call tha and see what happens.

Fred

---

<div class="post-metadata">

**Author:** ![gokulamurthy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/858c86/32.png) [@gokulamurthy](https://www.ruby-forum.com/u/gokulamurthy)\
**Post date:** [May 8, 2008, 9:43am UTC](https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199/3 "2008-05-08T09:43:16Z")

</div>

I had the same issue today and, Oh man! this was so freaking difficult  
to debug!

The problem in my case was I’m using jquery on my page and this was on  
application.js:

$(‘a.buttonstyle’).click(function() {  
$(this).parent().submit();  
});

I think the idea was to make a link act as a form button. This may be  
ok if you are using this css class on a link inside a form of yours.  
But what happens if you are using a link\_to … :method =\> “post” ?  
Multiple redirects!!! that’s what was happening to me at least. So my  
advice would be: look for rare javascript calls (unobtrusive calls?)  
around the view that is failing with that redirect message.

---

<div class="post-metadata">

**Author:** ![gokulamurthy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/858c86/32.png) [@gokulamurthy](https://www.ruby-forum.com/u/gokulamurthy)\
**Post date:** [June 9, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/re-302-found-i-dont-know-how-this-is-happen-even-i-have-the-respective-file-in-server/133199/4 "2008-06-09T22:40:26Z")

</div>

Hi,

Finally i debugged this error, this is becoz of non-commenting the  
line to save the session as active\_record. So that in my production  
server, i doesnt have permission to create a new file for each  
session. so that session is get expired then logged out automatically.  
I have only read and execute permission in the production server. once  
I have removed the comment, sessions are get saved into my DB, then  
sessions get reliable as usual.

Thanks

P.Gokula murthy
