Skip to content

Monthly Archives: October 2008

Mysql issue with rails and antivirus on windows

abstract_adapter.rb:150:in log’: Mysql::Error: Can’t create/write to file ‘C:\MySQL5\tmp\#sql_190_0.MYI’ (Errcode: 13) I had been getting this issue quite a bit recently. The cause actually turned out to be a conflict between McAfee and MySQL. What was happening is that McAfee scans any file that is recently written to, especially those in tmp directories. McAfee reading the […]

testing protected and private methods in ruby

When I was looking for how to test protected an private methods in ruby on the net, I found many sites arguing whether you should, and several methods for doing so. I am of the opinion that if your method contains any logic at all, it should have a test. Some examples of what I […]

hiding production database info from source control with capistrano

Whether you are working on an open source app or an enterprise app, it is a good idea to keep the production database connection information out of source control. To do so, add the following to your deploy.rb file: task :overwrite_database_yml_file do run "[ -f /var/rails/#{application}/database.yml ] && cp -f /var/rails/#{application}/database.yml #{latest_release}/config/ || echo 'database.yml […]