I created a gem for a ruby C extension. Compiling the gem and
installation goes find. When I try to run the test I get the following
error:

[gus@comp ~]$ sudo
ruby /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/test/rulog.rb

Loaded suite /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/test/rulog
Started
.ruby: symbol lookup
error: /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/lib/rulog.so: undefined
symbol: rb_mark

But, if I specify an include directory to ruby, it work:

[gus@comp ~]$ sudo ruby
-I /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/lib /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/test/rulog.rb

Loaded suite /usr/lib/ruby/gems/1.8/gems/Rulog-0.1.0/test/rulog
Started
....
Finished in 2.341459 seconds.

4 tests, 38 assertions, 0 failures, 0 errors


Duh! Why can't it load rulog.so in the first case? The platform is ruby
1.8.2 (2004-12-25) [i586-linux-gnu].

Any idea, pointers?

Guillaume.