I’m new to Ruby, Rails, and this list. I’ve tried searching for an
answer but it all seems to be over my head. I have all the books but
again they seem to leave me on my own to figure out the stuff that
really matters. Where is the best place to find out the details?
Exactly what are these much celebrated “naming conventions”; i.e. where
do I find an exhaustive list of these rules?
Everything runs great under Webrick and then getting it all running
under Apache is a nightmare. Why is this?
Here’s the kind of output I’m getting in the logs:
[Sun Jun 04 19:13:10 2006] [error] mod_ruby: error in ruby
[Sun Jun 04 19:13:10 2006] [error] mod_ruby:
/srv/www/htdocs/bget.org/www/aistracking/app/views/client/list.rhtml:5:
uninitialized constant #Module:0x40ab0278::Client (NameError)
[Sun Jun 04 19:13:10 2006] [error] mod_ruby: from (eval):77
[Sun Jun 04 19:13:10 2006] [error] mod_ruby: from
/usr/lib/ruby/1.8/apache/eruby-run.rb:116:in eval_string_wrap' [Sun Jun 04 19:13:10 2006] [error] mod_ruby: from /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in
run’
[Sun Jun 04 19:13:10 2006] [error] mod_ruby: from
/usr/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler’
[Sun Jun 04 19:13:10 2006] [error] mod_ruby: from
/usr/lib/ruby/1.8/auto-reload.rb:84
I’ve got all kinds of crazy stuff going on in my virtual host record.
Individual RBX and RHTML files can be made to work but Rails seems like
it always throws some kind of error. Here’s my virtual host record:
<VirtualHost 65.172.243.112:80>
ServerAdmin [email protected]
DocumentRoot /srv/www/htdocs/bget.org/www
ServerName www.bget.org
ServerAlias bget.org *.bget.org
ErrorLog /var/log/apache2/error_log
CustomLog /var/log/apache2/access_log common
DirectoryIndex index.html index.htm index.php index.cfm
UseCanonicalName Off
HostnameLookups Off
ServerSignature On
<Directory /srv/www/htdocs/bget.org/www>
Options FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
If the ruby module is installed, this will be enabled.
# for Apache::RubyRun RubyRequire apache/ruby-runexec files under /ruby as ruby scripts.
<Location /srv/www/htdocs/bget.org/www>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
Options +ExecCGI
exec *.rbx as ruby scripts.
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
exec *.rb as ruby scripts.
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
# for Apache::ERubyRun
RubyRequire apache/eruby-run
# handle files under /eruby as eRuby files by eruby.
<Location /srv/www/htdocs/bget.org/www>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
# handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
# for Apache::ERbRun
RubyRequire apache/erb-run
# handle files under /erb as eRuby files by ERb.
<Location /erb>
SetHandler ruby-object
RubyHandler Apache::ERbRun.instance
# for debug
RubyRequire auto-reload
My thought is some patient soul will help me. Thanks in advance.