[Rails] Re: Rails on mod_ruby
Eric Anderson
eric at afaik.us
Thu Dec 9 15:11:09 GMT 2004
David Heinemeier Hansson wrote:
> This is because you're loading auto-reload.rb in your Apache
> configuration for mod_ruby. Don't. auto-reload is a shallow approach to
> reloading that causes more confusion that it adds in convenience. Rails
> 0.9 has a much better reloading scheme that knows how to separate
> application and framework. You want to use that instead.
I am just trying out rails and have other ruby-based apps I am
developing on the server. If I disable auto-reload then won't I have to
restart the webserver every time I make a change?
> That's not really the cause of your error, though. The problem is that
> singleton.rb is being required twice as Ruby uses the path specified to
> decide whether to require once or twice. And singleton.rb is not
> designed to be required twice (as neither is many parts of Rails).
Well my app isn't requiring it so I assume something about Ruby or Rails
is causing it to be required twice with two different paths. So
basically my only possible solutions are:
* Turn off autoreloading meaning I will have to restart the webserver
every time I make a change (not viable).
* Run rails as a fcgi app or plain cgi.
Are there any other alternatives? How are other people using mod_ruby
and rails? Does everyone just have autoreload turned off?
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://one.textdrive.com/pipermail/rails/attachments/20041209/f5eb0a76/signature.bin
More information about the Rails
mailing list