From: "Sean C. Burbidge" Date: 2004-08-10T05:37:46+09:00 Subject: Re: mod_ruby problem Kent Sibilev wrote: > Have you reinstalled Ruby recently? The thing is that mod-ruby > installs its package into lib/ruby/1.8/ directory instead of > lib/ruby/site_ruby/1.8. So every time you reinstall Ruby you have to > reinstall mod_ruby as well. i did emerge the latest ruby a couple of days ago. just restarted apache today for some config changes to take effect, and that's when i notied my mod-ruby setup was busted. looking through the main apache error log, i just found this error: "mod_ruby: failed to require apache/eruby-run" "mod_ruby: error in ruby\n/usr/lib/ruby/1.8/apache/eruby-run.rb:45:in `require': No such file to load -- eruby (LoadError)\n\tfrom /usr/lib/ruby/1.8/apache/eruby-run.rb:45\n" --- /usr/lib/ruby/1.8/apache/eruby-run.rb:45: require "eruby" --- i assume that it's looking for eruby.so, which is in /usr/lib/ruby/1.8/i686-linux-gnu. i've symlinked to that file in 1.8/apache: eruby.so -> /usr/lib/ruby/1.8/i686-linux-gnu/eruby.so but still no joy. at this point i'm wondering if the mod-ruby ebuild is wonky or if it's a problem with the .so being in a directory that's not in the right path? symlinking 1.8/apache into site_ruby/1.8 doesn't work either, but changes the error message in my apache error_log: "error in ruby\n/usr/lib/ruby/site_ruby/1.8/apache/eruby-run.rb:45:in `require': No such file to load -- eruby (LoadError)\n\tfrom /usr/lib/ruby/site_ruby/1.8/apache/eruby-run.rb:45\n" [ note path change from 1.8/ to site_ruby/1.8 ] so it appears that require prefers site_ruby/1.8 over 1.8? but still no explanation why the fatal on the require "eruby" statement on line 45 of eruby-run.rb. sean > On Aug 9, 2004, at 3:02 PM, Sean C. Burbidge wrote: > >> hi all, >> >> mod_ruby WAS working; now it's not. here's the apache error: >> >> "mod_ruby: error in ruby\n(eval):45: (eval):45: uninitialized constant >> Apache::ERubyRun (NameError)\n\tfrom (eval):45:in `value'\n" >> >> here are the relevant portions of my apache config: >> >> LoadModule ruby_module /usr/lib/apache/mod_ruby.so >> RubyRequire apache/ruby-run >> RubyRequire apache/eruby-run >> >> SetHandler ruby-object >> RubyHandler Apache::RubyRun.instance >> >> >> SetHandler ruby-object >> RubyHandler Apache::ERubyRun.instance >> >> >> this is a gentoo system: >> >> mod_ruby 1.2.0 >> ruby 1.8.2_pre2 >> apache 1.3.31-r2 >> >> any and all help is greatly appreciated. i've re-emerged mod-ruby a >> couple of times, weeded out unnecessary lines in config files, and >> sacrificed a chicken - all to no avail. i've also checked the mailing >> list archives, and everything *appears* to be setup correctly. i know >> i'm missing something - i just can't find it. >> >> thanks! >> sean