Unforunately I forgot to get the RedCloth gem. So when I updated my project source from SVN the project broke output in development.log. I eventually figured out that I was missing the gem. So I downloaded the gem, then moved the whole RedCloth folder into the vendor/plugins directory of the rails project.
The lack of error messages pointing me to the “require ‘RedCloth’” was annoying to say the least. Maybe the require statement should be moved someplace else? Someplace after the logger has been initialized maybe? I wonder if other error/issues in enviroment.rb will make WEBrick die out too. Maybe you can start WEBrick with some advanced debugging for these kinds of situations? Hmm, I guess I should do a little research…


2 Comments
After getting clued in to the role the vedor/ dir plays in a Rails app, I’ve masde it a habit of putting all external code there. When I packge up and deliver code to a client, or a co-worker checkes ut the source, or we deploy someplace,I want to be sure everything is available.
Curious about the error message. I have this at the tail end of an environment.rb file, which leads me to believe I’ve had the same annoyance you ran into:
# Include your application
# configuration below
begin
require ‘base-model’
require ‘risk_areas’
require ‘misc-utils’
require ‘string-utils’
rescue Exception
STDERR.puts( “Failed to load extra libs: #{$!}” )
raise $!
exit
end
(Sorry about the formatting; have no idea how force preformated rendering.)
Thanks for the tip James! I’ll start making a habit of catching exceptions in environment.rb.