This has been the best setup directions I have found in setting up PostgreSQL on Mac OS X from source.

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

links 01-09-2007

January 9, 2007

ActiveRecord logger to see DB calls:
http://weblog.jamisbuck.org/2007/1/8/watching-activerecord-do-it-s-thing

Ruby if – else:
http://weblog.jamisbuck.org/2007/1/5/brevity-vs-clarity

Capistrano custom maintenance page:
http://clarkware.com/cgi/blosxom

Rails Rubyisims:
http://errtheblog.com/post/44

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 Rails::Initializer.run. This should be seet lower then interactive_timeout for your database. In a mysql prompt you can type
    SHOW VARIABLES;
    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.

SYMPTOM:
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:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/218107

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

Easy MySQL server login trick

December 15, 2006

I just discovered a new MySQL tip today that I sub-consciously wanted. A way to type one command and be logged into MySQL server when I was on the production machine. Here is how you do it:

Create a file .my.cnf in your home directory. Put the following entry into it:

[mysql]
user=user
password=pass

Then create a file in /usr/local/bin called db or whatever, and put this in it:

#!/bin/bash
mysql db_name

Now from anywhere in the terminal you can type . db and automatically have a mysql prompt. Lovely!

MyFreeCopyright.com now has 18 users and 26 copyright registrations. That is three days of nothing but google adWords bringing people to our site. In three days google refered 43 people to MyFreeCopyright.com. That is just under 50%. Again not bad for three days.

We had some issues with email coming from the MyFreeCopyright.com server being flagged as spam from Yahoo, Hotmail, and AOL. Give thanks that I have a super linux guru on the team. A couple tweaks and everything is all good. If you need this or another trick done to fix your companies emails from being flagged as spam, let me know.

Follow

Get every new post delivered to your Inbox.