newbie install problem

Discussion
David G.
2004-11-26
2013-04-09
  • David G.

    David G. - 2004-11-26

    Hello everyone,

    I am trying to work a bit with rudl.  I installed Ruby1.8.2-prev14...newest One-Click-Installer for Windows, and installed Core with Docs and RubyGems.

    I then installed rudl and put .dlls in <rubyDir>/bin when asked...

    When I try to run any programs in rudl/samples I get the following error in all attemps (didn't try allll programs but everyone one I tried has this error):

    C:\apps\temp\rudl\samples>ruby scale2x.rb
    (eval):114: undefined method `print_centered' for class `RUDL::SFont' (NameError)
            from c:/apps/dev/ruby/sdk/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `require'
            from scale2x.rb:11

    C:\apps\temp\rudl\samples>

    ...sorry if the formatting of the above error is ugly...any help on how to remedy this error, I'd really like to use rudl....

    thank you, David G.

     
    • Michael Lambert

      Michael Lambert - 2004-12-12

      i'm having the same problem...any ideas?

       
    • Renne Nissinen

      Renne Nissinen - 2004-12-12

      It truly is strange. We hadn't seen this problem before, but now I got the same error when I manually require()'d rubygems.

      So the quick solution would be to disable or uninstall rubygems. We're investigating what's happening (why does something outside of the rudl sample try to call print_centered??), but we're still rather busy at the moment and we don't expect to find a solution in the next days.

       
    • Eugene Tan

      Eugene Tan - 2004-12-25

      I had this problem, then reverted to a previous version of the One-click installer (1.8.2-14_rc8). Now it works. Hope this helps in some minor way!

       
    • Glenn

      Glenn - 2005-02-18

      Any progress with fixing this, guys?

      I can get my program to work if I install Ruby1.8.2-14 but uncheck the "RubyGems" option during install, and use Rudl 0.8, but without RubyGems quite a few things don't work.

      Ta

      Glenn

       
    • Danny van Bruggen

      I've posted a bug report here http://rubyforge.org/tracker/index.php?func=detail&aid=1387&group_id=126&atid=575 but the creators seem to be busy, their buglist is getting longer and longer :(

       
    • Eugene Tan

      Eugene Tan - 2005-02-25

      Forgot to mention another tip, putting double underscores after the require 'RUDL'  statement allows your program to work, whether rubygems is installed or not. Found this out from the Ruby mailing list. So, the whole line would be:
      require__ 'RUDL'

      I hope more people use this great library! I've found these two utilities (tar2ruby and ruby2exe) to be useful in packaging rudl programs: http://www.erikveen.dds.nl/ruby.html

       
    • onelin

      onelin - 2005-03-13

      Thanks for the require__ tip! That fix works, and ruby2exe sounds useful, too.

       
    • David Piepgrass

      David Piepgrass - 2005-12-21

      OK, I just installed RUDL and had the same problem... has there been no progress toward fixing it in more than a year?

       
    • David Piepgrass

      David Piepgrass - 2005-12-21

      OK, here's a script I made to fix the problem. 

      Does anyone know what require__ means or why it works or what rubygems does to screw up RUDL?

      # require2require__.rb
      Dir.foreach('.') do |fn|
          if fn =~ /.(rb|rbw)$/ then
          puts "Processing #{fn}"
             
          File.rename(fn, fn + '.bak')
             
          File.open(fn + '.bak', 'rb') do |f|
            text = f.read
           
            text.gsub!(/^(\s*)require(?=\s*([\&quot;\'])RUDL\2)/, '\1require__')
           
            File.open(fn, 'wb') do |out|
              out.write(text)
            end
          end
          end
      end

      require__ 'RUDL'; include RUDL

      Timer.delay(10000)

       
    • David Piepgrass

      David Piepgrass - 2005-12-21

      BTW, it's hard to imagine what could be wrong with RubyGems.  The code is dead simple:

      module Kernel
        alias require__ require

        def require(path)
          require__ path
        rescue LoadError => load_error
          ...

      BTW, I searched for the string "print_centered" in the files in rudl-0.8-for-ruby-1.8.2-setup-releasebuild, but couldn't find anything.  I also searched the Ruby folders.  Where is this defined?

       

Log in to post a comment.