This is from the rails mailing list:
On Jan 1, 2006, at 4:00 PM, Duane Johnson wrote:
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/
Duane-
I have seen the exact same behavior for a few reasons. I get the
blank screen in a fresh rails app just like you describe when the
database isn't connected or database.yml is not filled out. I also
get it if I do something in environment.rb that doesn't work like
require a file that can't be found. It seems like it rails kind of
gets hung trying to load its environment so no errors go to any
logs and you just get a white screen with no errors anywhere. The
same thing can happen sometimes when you have stale old sessions
in /tmp.
I hate the empty screen, rails should have kittens when this
happens and put errors in the logs or something. It can be a
frustrating problem to debug as well.
Anyway, I'm just confirming this behavior as I see the same thing
you do.
Cheers-
-Ezra Zygmuntowicz
Is this happening for a reason? It seems to me that Rails should be
a little more robust on its "minimum requirements" for a basic
controller and view to work properly. I'd like to investigate
further, so I'm looking for a little feedback first.
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core