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:
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].
Ruby is able to find libraries installed via RubyGems only after the
rubygem library is loaded. You can accomplish in several ways,
including setting an environment variable (RUBYOPT=rubygems), including
-rubygems on your ruby command line, or even putting a ‘require
“rubygems”’ in your source code. See http://docs.rubygems.org/read/chapter/3#page70 for details.
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].
Ruby is able to find libraries installed via RubyGems only after the
rubygem library is loaded. You can accomplish in several ways,
including setting an environment variable (RUBYOPT=rubygems), including
-rubygems on your ruby command line, or even putting a ‘require
“rubygems”’ in your source code. See http://docs.rubygems.org/read/chapter/3#page70 for details.
Thanks for you quick answer. But I forgot to mention that I already have
the RUBYOPT variable set:
What strikes me as odd in this case is that it gives the right path of
the library to load (somewhere in /usr/lib/ruby/gems) but fails to load
it. If the path is added to $: (in the second example), then it loads
properly.
On Wed, 2005-12-28 at 09:47 +0900, Une bévue wrote:
BEWARE, in your case you have TWO “r” ie :
-rrubygems
Actually, both work. AFAIK, rubygems is the official name of the library
but ubygems is also there so it looks good when using the -r options.
‘ruby -rubygems’ and ‘ruby -rrubygems’ are equivalent.
do you think this is right, because i’ve done :
export RUBYOPT=rubygems
(without de “-”)
and, i’ve seen progs complaining about ubygems (without the “r”)
BEWARE, in your case you have TWO “r” ie :
-rrubygems ^^______
On Wed, 2005-12-28 at 07:38 +0900, Guillaume M. wrote:
http://docs.rubygems.org/read/chapter/3#page70 for details.
What strikes me as odd in this case is that it gives the right path of
the library to load (somewhere in /usr/lib/ruby/gems) but fails to load
it. If the path is added to $: (in the second example), then it loads
properly.
My fault. rb_mark doesn’t exists, rb_gc_mark is want I wanted. What
confused me is that it doesn’t complain when the library is required,
but when the call of this function is made.
Actually, both work. AFAIK, rubygems is the official name of the library
but ubygems is also there so it looks good when using the -r options.
‘ruby -rubygems’ and ‘ruby -rrubygems’ are equivalent.
thanks for your input that makes my setup clearer to me ))
my prob with “ubygems” comes to the fact i’ve two Rubys :
the default install on MacOS X /usr/bin/ruby
and the darwinports one /opt/local/bin/ruby
only the latest works with rubygems…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.