August 22, 2009
This has been the best setup directions I have found in setting up PostgreSQL on Mac OS X from source.
May 26, 2008
Here is a great easy to follow direction for installing Imagemagick and RMagick on Leopard.
December 17, 2006
This checklist has been compiled by my recent experience and things I did not do and caused me to run into issues.
- 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.
- 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.
- 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
to find the value. In mine it was set to 28800.
- 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.
- 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.
- 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.
December 17, 2006
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.
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:
Then create a file in /usr/local/bin called db or whatever, and put this in it:
Now from anywhere in the terminal you can type . db and automatically have a mysql prompt. Lovely!
December 12, 2006
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.