Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] turnsole crash on start up
@ 2011-05-02 22:17 Hamish
  2011-05-04 16:18 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Hamish @ 2011-05-02 22:17 UTC (permalink / raw)
  To: sup-devel

I've finally got around to playing with turnsole, and it crashes out
immediately :/

$ ruby1.9.1 -Ilib -I../heliotrope/lib bin/turnsole 
/home/mish/dev/sup/turnsole/lib/turnsole/models.rb:88:in `at': can't convert String into an exact number (TypeError)
        from /home/mish/dev/sup/turnsole/lib/turnsole/models.rb:88:in `initialize'
        from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `new'
        from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `block (2 levels) in search'
        from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `map'
        from /home/mish/dev/sup/turnsole/lib/turnsole/client.rb:34:in `block in search'
        from /home/mish/dev/sup/turnsole/lib/turnsole/ui.rb:76:in `call'
        from /home/mish/dev/sup/turnsole/lib/turnsole/ui.rb:76:in `step'
        from bin/turnsole:134:in `<main>'

I tried in the web browser, and a search appears to work fine (and is
impressively quick :) for a couple of terms I tried. But when I click on
the inbox link, I go to URL:

http://localhost:8042/search?q=~inbox

and get a big old error page :( The relevant parts are:

TypeError at /search
false can't be coerced into Fixnum
file: heliotrope-server location: - line: 377

[snip]

bin/heliotrope-server in -
377.    date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
bin/heliotrope-server in strftime
377.    date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
bin/heliotrope-server in threadinfo_to_html
377.    date = escape_html Time.at(thread[:date]).strftime("%Y/%m/%d %H:%M")
bin/heliotrope-server in block (2 levels) in <class:HeliotropeServer>
157.        results.map { |r| threadinfo_to_html r }.join +
bin/heliotrope-server in map
157.        results.map { |r| threadinfo_to_html r }.join +
bin/heliotrope-server in block in <class:HeliotropeServer>
157.        results.map { |r| threadinfo_to_html r }.join +
/usr/lib/ruby/1.9.1/webrick/httpserver.rb in service
111.      si.service(req, res)
/usr/lib/ruby/1.9.1/webrick/httpserver.rb in run
70.          server.service(req, res)
/usr/lib/ruby/1.9.1/webrick/server.rb in block in start_thread
183.          block ? block.call(sock) : run(sock)

[snip]

Any ideas? Does heliotrope have a console like sup that I could try
tracking down which message this would be? (I'm using maildir in case it
makes a difference).

Hamish Downer
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] turnsole crash on start up
  2011-05-02 22:17 [sup-devel] turnsole crash on start up Hamish
@ 2011-05-04 16:18 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2011-05-04 16:18 UTC (permalink / raw)
  To: sup-devel

Reformatted excerpts from Hamish's message of 2011-05-02:
> Any ideas? Does heliotrope have a console like sup that I could try
> tracking down which message this would be? (I'm using maildir in case
> it makes a difference).

I suspect these are both the same issue---the date for a particular
thread is being set to false instead of to an integer.

I've added bin/heliotrope-console, which is a simple wrapper around irb.
You can see if you can track it down that way. In the meantime I'll
scour the codebase and see if I can find an obvious culprit, or at least
add some protection code.

Thanks for the bug report!
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-04 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 22:17 [sup-devel] turnsole crash on start up Hamish
2011-05-04 16:18 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox