Subject: [sup-talk] NoMethodError running sup-config

From: [email-masked] (Sho Fukamachi)
Date: Thu, 24 Jan 2008 19:11:48 +1100

Hi all,

Thought I'd try out sup but get a crash trying to configure:

------------------------

[Thu Jan 24 18:42:10 +1100 2008] unlocking /Users/sho/.sup/lock...
/Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/loader.rb:25:in  
`initialize': undefined method `path' for #<Redwood::MBox::SSHFile: 
0x17df7ac> (NoMethodError)
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/ssh-loader.rb: 
29:in `new'
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/ssh-loader.rb: 
29:in `initialize'
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:103:in `new'
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:103
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:87:in `each'
	from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:87
	from /usr/bin/sup-add:19:in `load'
	from /usr/bin/sup-add:19
Rats, that failed. You may have to do it manually.
Try again? (enter for "n"):

---------------------

As you can probably see, it's MacOSX 10.5.1. gettext was manually  
installed.

I was trying to add a new remote mbox, the path I gave was  
mydomain.com/var/spool/mail/my_mbox. I tried with and without the  
leading slash in the remote server path, crashed both times.

I realise it's probably something dumb I'm doing but I did try a  
couple of times. Any clues?

thanks!

Sho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080124/490de6fc/attachment.bin

---

From: [email-masked] (William Morgan)
Date: Thu, 24 Jan 2008 16:26:50 -0800

> couple of times. Any clues?

Nope, this is an Official Bug. Sorry! The following minor patch should
fix it. Git master and next have been updated with this.

diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb
index 25074be..d474636 100644
--- a/lib/sup/mbox/ssh-file.rb
+++ b/lib/sup/mbox/ssh-file.rb
@@ -122,6 +122,7 @@ class SSHFile
   def seek loc; @offset = loc; end
   def tell; @offset; end
   def total; size; end
+  def path; @fn end
 
   def size
     if @file_size.nil? || (Time.now - @last_size_check) > SIZE_CHECK_INTERVAL

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Sho Fukamachi)
Date: Fri, 25 Jan 2008 21:35:30 +1100

> fix it. Git master and next have been updated with this.

Great, I cloned it and ran from there. The problem is fixed, but  
exposed another problem when it tried to do a sup-add, which also  
errored out. I was able, however, to do the sup-add manually without  
further issue. Weirdly, my friend also running leopard didn't have any  
issue at all. Maybe a gem I have installed? She was running stock, I  
have a billion gems installed for dev work.

Anyway, thanks for your help! I really like sup .. it's a joy to use.

One more thing: there seem to be pretty severe display errors when I  
display (and scroll through) japanese mail. I'm not really sure how to  
go about troubleshooting what's wrong. Shall I make a new thread here,  
or send you the mail I have in mind which exposes the problem directly?

thanks!

Sho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/9ce505ed/attachment.bin

---

From: [email-masked] (William Morgan)
Date: Wed, 30 Jan 2008 09:14:42 -0800

Reformatted excerpts from Sho Fukamachi's message of 2008-01-25:
> further issue.

If you have the backtrace, I'd be happy to take a look.

> Anyway, thanks for your help! I really like sup .. it's a joy to use.

Glad to hear it!

> or send you the mail I have in mind which exposes the problem

The problem is that the Ruby ncurses library doesn't have wide character
support. So non-ASCII characters should appear, if the locale is
detected correctly, but ncurses will be completely confused every time
it prints a wide character because it expects the character to have
taken multiple columns whereas the terminal interpreted it as only one.

At least, that's my limited understanding of the issue.

There was some preliminary work at recompiling the ruby ncurses library
to enable wide characters here:

http://rubyforge.org/pipermail/sup-talk/2007-October/000297.html