Here is a great easy to follow direction for installing Imagemagick and RMagick on Leopard.


This checklist has been compiled by my recent experience and things I did not do and caused me to run into issues.

  1. DO NOT have ruby logger rotate itself. In a clustered environment all instances will try and rotate the log at once. One will win and stay alive all others will crap out. Have an external program manage the logs for you.
  2. If using capistrano change the svn setting from checkout to export:
    set :checkout, “export”
    This is for security reasons because there is extra details in the .svn metadata in a checkout opposed to an export.
  3. Set the ActiveRecord database verification timeout:ActiveRecord::Base.verification_timeout = 14400Place this in your environment.rb right after the end of This should be seet lower then interactive_timeout for your database. In a mysql prompt you can type
    to find the value. In mine it was set to 28800.
  4. Create a maintenance page. This is easily managed thru capistrano and in my situation allowed me to direct all traffic to the maintenance page while I left the server running and debugged it locally. It will come in handy.
  5. Use the Exception Notifier plugin and clean up the 404 and 500 html files in the public dir. The plugin uses them and sends you the error in an email.
  6. CAPTURE DATA! I am going back and modifying several tables to capture more data. Rails convenient created_on and other helpers are excellent, use them. You can never collect too much data, we are in the information age.

This one stumped me for almost a week now.

Late in the evening all instances of mongrel but one would return a Status: 500 Internal Server Error. One instance would still work fine, strange enough it was always the second instance started that would still be alive. If you ran one instance it was fine. The error would present itself only in a mongrel clustered environment.

Thanks to Eden on the mongrel mailing list, the solution was found:

DO NOT allow the ruby logger to rotate itself in a clustered environment. Have some other external program manage the logs for you.

Rotating Ruby on Rails Logger

December 10, 2006

This is a very simple process. Just add a line in your config/environment.rb right BEFORE do |config|.

The line looks like this:


You can find other parameters to pass to it by looking at the ruby Logger API.

I had the problem of two div floats and having the text below clear them in all browsers. After finding this article: my quick solution was this:


<div style=”float:left;”></div>

<div style=”float:right;”></div>

<br style=”clear:both”/>


The key here is that the float elements are contained in their own DIV and a BR tag is used to clear the floats. Those two tricks allow this to work in all browsers.

There may be a better way, but for now every time I run migrate on a production server I need to set the ENV variable:

export RAILS_ENV=production
rake migrate