Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Autoloading objects — Ruby equivalent for PHP5 "__autoload
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Piotr Biedruna, post: 4553530"] Well, th const_missing sollution does work, but only in scripts called directly in shell by 'ruby' executable. When using it in script called in browser i get: [Tue Mar 20 16:56:49 2007] [error] mod_ruby: error in ruby [Tue Mar 20 16:56:49 2007] [error] mod_ruby: /home/services/httpd/html/TRON/ruby/index.rb:11: uninitialized constant #<Module:0xb6a6ea30>::Test (NameError) [Tue Mar 20 16:56:49 2007] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/ruby-run.rb:38:in `load' [Tue Mar 20 16:56:49 2007] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/ruby-run.rb:38:in `handler' Got apache 2.2 with mod_ruby configured as follows: LoadModule ruby_module modules/mod_ruby.so <IfModule mod_ruby.c> AddType text/html .rb RubyRequire apache/ruby-run <Files *.rb> Options +ExecCGI SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> </IfModule> What i`ve been trying to get is an equivalent of PHP __autoload() routine working under both shell execution and apache handler. Know any? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Autoloading objects — Ruby equivalent for PHP5 "__autoload
Top