#14 undefined method `print_centered' for class `RUDL::SFont'

open
nobody
None
5
2004-11-22
2004-11-22
Jerome Zago
No

I get this message when I try to run sdl_ball.rb (for
instance) in samples/:

(eval):114: undefined method `print_centered' for class
`RUDL::SFont' (NameError)
from
c:/oams/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_mana
ger.rb:5:in `require'
from sdl_ball.rb:9

I run Windows XP Pro.
I installed ruby182-14RC9.exe into C:\OAMS\Programs\ruby.
I unpacked
rudl-0.8-for-ruby-1.8.2-setup-releasebuild.zip into
C:\OAMS\Programs\rudl.
I ran install-on-windows.rb and it copied the dlls in
c:/oams/programs/ruby/bin.

More details upon request. Thanks for your time.

Discussion

  • Logged In: YES
    user_id=575454

    Try to remove the RUBYOPT enviroment variable, this solved
    the problem in my case.

     
  • Typhaire
    Typhaire
    2005-05-09

    Logged In: YES
    user_id=1275461

    I found that same issue aswell. If you look in the code where
    it has the requires and include files, change this:

    require 'RUDL'

    To this:

    require__'RUDL'

    That seems to do it. Not sure why. Anyways, have a good
    one!

    Ciao,
    Typhaire

     
  • Logged In: YES
    user_id=171344

    How come the installation instructions for RUDL don't
    mention this problem? EVERYONE who uses the Ruby one-click
    installer and RUDL will encounter this problem!

    This *appears* to be caused by RubyGems, in the sense that
    if you disable RubyGems, it works. However, even if
    RubyGems is disabled, it is simple to reproduce this
    problem. Just put the following at the beginning of any
    code that uses RUDL:

    module Kernel
    alias require__ require
    def require(path)
    require__ path
    end
    end

    require 'RUDL'

     
  • Logged In: NO

    I help!!!
    The suggestions below don't work.

    solutions,
    geraldocomp@hotmail.com

     
  • Logged In: YES
    user_id=1582526

    I help!!!
    the suggestions below, didn't work.

    can anybody help myself???
    urgent!!!