Subject: [sup-devel] trouble running git version

From: Hamish D <[email-masked]>
Date: Sat, 9 Oct 2010 18:41:01 +0100

Hello

I'm cloned the git repository, and I've even written a patch, but it's
untested as I don't seem to be able to run a development version. The
error I get is:

$ ruby -Ilib -Ilib/sup -w bin/sup
./lib/sup/thread.rb:256: undefined method `bool_reader' for
Redwood::ThreadSet:Class (NoMethodError)
       from /usr/lib/ruby/1.8/rubygems.rb:11:in `require'
       from /usr/lib/ruby/1.8/rubygems.rb:11
       from bin/sup:3:in `require'
       from bin/sup:3

bool_reader does exist in lib/sup/util.rb

I am running Ubuntu (10.10/maverick) and have the sup-mail package
installed. The installed sup works fine.

$ ruby --version
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]

I'm wondering if my ruby paths are part of the problem. You might have
noticed that I specified -I lib -I lib/sup above. If I miss out the
second include I get:

$ ruby -Ilib  bin/sup
/usr/lib/ruby/1.8/sup/poll.rb:31: undefined method `[]' for
nil:NilClass (NoMethodError)
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
       from ./lib/sup.rb:341
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
       from bin/sup:15

Here ruby has picked up the sup/poll.rb from the installed version
rather than the checked out version. Adding -w to this version gives a
few warnings that I don't get when using -Isup/lib:

$ ruby -Ilib  -w bin/sup
./lib/sup/util.rb:316: warning: `&' interpreted as argument prefix
./lib/sup/util.rb:19: warning: method redefined; discarding old gen_lock_id
./lib/sup/util.rb:30: warning: method redefined; discarding old dump_lock_id
./lib/sup/message-chunks.rb:36: warning: method redefined; discarding
old make_tmpname
./lib/sup/message.rb:285: warning: `&' interpreted as argument prefix
./lib/sup/index.rb:553: warning: `&' interpreted as argument prefix
/usr/lib/ruby/1.8/chronic/repeaters/repeater_month_name.rb:13:
warning: useless use of > in void context
/usr/lib/ruby/1.8/chronic/repeaters/repeater_month_name.rb:19:
warning: useless use of > in void context
/usr/lib/ruby/1.8/chronic/repeaters/repeater_month_name.rb:25:
warning: useless use of < in void context
/usr/lib/ruby/1.8/sup/poll.rb:31: warning: global variable `$config'
not initialized
/usr/lib/ruby/1.8/sup/poll.rb:31: undefined method `[]' for
nil:NilClass (NoMethodError)
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
       from ./lib/sup.rb:341
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
       from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
       from bin/sup:15

I've looked at the code, but the bool_reader is something messing
about with modules and classes at a deep-ish level and is beyond my
ruby understanding.

Any ideas appreciated.
Hamish
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Hamish D <[email-masked]>
Date: Sat, 9 Oct 2010 19:07:07 +0100

> installed. The installed sup works fine.

After some help in irc I've got it working. I had to uninstall the
sup-mail package and now it works.

Hopefully having it in the list archives can save someone else a little pain ...

Hamish