# Weird error message

**URL:** <https://www.ruby-forum.com/t/weird-error-message/132811>\
**Category:** Rails\
**Created:** [March 24, 2008, 10:38pm UTC](https://www.ruby-forum.com/t/weird-error-message/132811 "2008-03-24T22:38:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 24, 2008, 10:38pm UTC](https://www.ruby-forum.com/t/weird-error-message/132811/1 "2008-03-24T22:38:20Z")

</div>

Hi, as I add more and more tests I sometimes get this error:

Expected response to be a \<:success\>, but was \<0\>

I’m a little lost as to what it means… no response? error? But it  
seems to come and go as I change code. I never quite figured out why  
though.

Thanks for any help 🙂  
Jonzo.

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 1:24am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/2 "2008-03-26T01:24:08Z")

</div>

Hi I’m still having trouble with this, has anyone ever seen this  
message before?

fyi, I’m still using rails 1.2.3 till I can get time to make the move  
to 2.0. It might not be in the latest version, but I’d still like to  
know if anyone has seen this message before… ever

Thanks again,  
Jonzo.

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 2:50am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/3 "2008-03-26T02:50:57Z")

</div>

On Mar 25, 2008, at 5:23 PM, Jonzo wrote:

> > Jonzo.  
> > When you get a 0 instead of an HTTP response code, the page probably  
> > didn’t render correctly. Look at your test.log or, in your test:

puts response.body

That may give you a better idea what’s going on.

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 2:55am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/4 "2008-03-26T02:55:39Z")

</div>

Thanks! I’ll look into that.

Do you know anything more about this? I ask because usually when I  
have an error in a template or action it is output as an exception in  
the test summary. Does this error show up when there is a specific  
type of error? for instance, if rails locks up? or if it fails in a  
before\_filter? or something?

On Wed, Mar 26, 2008 at 2:50 PM, s.ross [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > though.
> 
> >

–  
Jonathan

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 3:02am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/5 "2008-03-26T03:02:41Z")

</div>

On Mar 25, 2008, at 6:54 PM, Jonathan F. wrote:

> Do you know anything more about this? I ask because usually when I  
> have an error in a template or action it is output as an exception in  
> the test summary. Does this error show up when there is a specific  
> type of error? for instance, if rails locks up? or if it fails in a  
> before\_filter? or something?

I’ve never characterized the problems that cause this beyond the fact  
that it happens when testing controllers. The key thing is you didn’t  
get an HTTP response code. So you know you didn’t get through render,  
which makes it likely that your code is flawed. That’s really the  
first thing you wanted to know from your test anyway, right?

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 3:05am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/6 "2008-03-26T03:05:37Z")

</div>

Ok cool, I’ll update this thread when I figure it out 🙂

On Wed, Mar 26, 2008 at 3:01 PM, s.ross [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> get an HTTP response code. So you know you didn’t get through render,  
> which makes it likely that your code is flawed. That’s really the  
> first thing you wanted to know from your test anyway, right?
> 
> >

–  
Jonathan

---

<div class="post-metadata">

**Author:** ![jfaulkenberry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c2a13f/32.png) [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Post date:** [March 26, 2008, 4:49am UTC](https://www.ruby-forum.com/t/weird-error-message/132811/7 "2008-03-26T04:49:35Z")

</div>

Found the problem! I had monkey patched CGI::Session to allow flash to  
provide a session id, but I’d moved the file around in my lib  
directory so it wasn’t loading properly, and rails was dying before it  
even got to my application!

all fixed now,  
Thanks for your help s.ross 🙂

On Wed, Mar 26, 2008 at 3:04 PM, Jonathan F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > type of error? for instance, if rails locks up? or if it fails in a
> > > 
> > > >
> 
> –  
> Jonathan

–  
Jonathan
