[Rails] Can Rails render pages if there is no database connected?
Duane Johnson
duane.johnson at gmail.com
Mon Jan 2 00:00:37 GMT 2006
I thought I knew the answer to this question ('yes'), however,
recently I've been trying to build an app that detects whether or not
the administrator has correctly configured the database. I'd like to
give instructions in the negative case.
So here's where I'm at: if the database is configured, my app runs
wonderfully; however, if the database doesn't exist, or if the
database login/password is incorrect, then Rails is completely
unresponsive. When I load any page, I get a blank white screen.
Checking the logs (even the server output) gives nothing at all (not
even a GET is reported in the terminal where I have Lighttpd running).
I created a simple Rails application from scratch ("rails simple" at
the command line) and went to the index.html page. That worked fine;
however, the 'About your application's environment' link shows
nothing but a thin yellow line. Checking the URL that it goes to
confirms that the same thing as described above is occurring: no
response at all.
Is this expected behavior, or is there something obvious I'm doing
wrong that's preventing my app from running without the database?
Thanks,
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
More information about the Rails
mailing list