Subject: [sup-talk] Crash of Sup 0.9.1

From: Karl Schudt <[email-masked]>
Date: Mon, 14 Dec 2009 15:28:04 -0600

I installed Sup on Opensuse, and it seems to run fine, indexing my gmail
account. But when I type a "\" to search, it crashes.

--- NoMethodError from thread: main
undefined method `new_field' for Ncurses::Form:Module
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/textfield.rb:36:in `activate'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/buffer.rb:561:in `ask'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/buffer.rb:26:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/buffer.rb:26:in `sync'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/buffer.rb:560:in `ask'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/util.rb:520:in `send'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/util.rb:520:in `method_missing'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/modes/scroll-mode.rb:84:in `search_in_buffer'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/mode.rb:51:in `send'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/mode.rb:51:in `handle_input'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/lib/sup/buffer.rb:265:in `handle_input'
/usr/lib64/ruby/gems/1.8/gems/sup-0.9.1/bin/sup:243
/usr/bin/sup:19:in `load'
/usr/bin/sup:19
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: William Morgan <[email-masked]>
Date: Sat, 19 Dec 2009 11:06:18 -0800

Reformatted excerpts from Andrei Thorp's message of 2009-12-14:
> As a somewhat obvious thing to say, I would guess that your ruby
> ncurses or ncurses is too old/new. Try upgrading your ncurses stuff --
> might help.

I think this is probably correct---there's something screwey about your
ncurses gem. Are you running Ruby 1.9 by any chance?
-- 
William <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Mark Alexander <[email-masked]>
Date: Fri, 29 Jan 2010 16:16:05 -0800

> undefined method `new_field' for Ncurses::Form:Module

I had this problem on my OpenSUSE 11.1 machines, and I finally figured
out the solution today.  The problem is that in OpenSUSE, certain
ncurses header files aren't found in /usr/include like in other
distros.  Specifically, panel.h, form.h, and menu.h are in
/usr/include/ncurses, not /usr/include.  Strangely, OpenSUSE chose to
make a symlink to ncurses/ncurses.h in /usr/include, but did not
provide symlinks for the other files.

The result was that when extconf.rb for the ncursesw gem was executed,
it could not find these header files.  You can see that at the bottom
of the output of extconf.rb if you run it manually:

  checking for the panel library...
  checking for panel.h... no
  checking for the form library...
  checking for form.h... no
  checking for the menu library...
  checking for menu.h... no

So I fixed it by manually creating the missing symlinks:

  cd /usr/include
  ln -s ncurses/form.h
  ln -s ncurses/panel.h
  ln -s ncurses/menu.h

Then I reran 'gem install ncursesw'.  It wasn't enough to do a 'make
clean && make && make install' in the ncursesw gem source directory.
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Andrei Thorp <[email-masked]>
Date: Mon, 14 Dec 2009 16:51:12 -0500

(Just a guess.)

-AT