git-svn fails to delete directories
April 26th, 2011
List all empty directories:
find . -wholename './.git' -prune -o -type d -empty -print
Find and delete all empty directories:
find . -wholename './.git' -prune -o -type d -empty -print -exec rm -rf \;
After deleting the directory it will complain that it cannot find the directory. I’m not sure why.
Execute those commands several times until no more empty directories are found. Nested empty directories have to be deleted in successive runs because they are not truly empty until their nested empties are deleted. :(
And fix the root of the problem:
--rmdir
Only used with the dcommit, set-tree and commit-diff commands.
Remove directories from the SVN tree if there are no files left behind. SVN can version empty directories, and they are not removed by default if there are no files left in them. git cannot version empty directories. Enabling this flag will make the commit to SVN act like git.
config key: svn.rmdir
Rails 2.3.8 & Mongrel 1.1.5 Bug
July 25th, 2010
The response body is: “You are being redirected”. The word “redirected” is a link to the page you wish it was going to. You never actually get redirected (at least not in FF or Safari).
I read about the problem here
One of the later comments had a gist that fixed it for me.
Copy this text
Paste into an initializer: mongrel_hack.rb
Commit, redeploy, done.
Then upgrade to Unicorn. :)
Rails Redo
March 8th, 2010
My environment for Ruby & Rails development began showing signs of wear and tear. I have been unable to get rvm to work for me at all. I dream about having the wonderful abilities it can provide, like independent sandboxes for rubies & gemsets, and configurations.
So when the latest gem upgrade (1.3.6) broke my older versions of rails (pre-2.3) things started to snowball uphill, and I decided to start over.
Read the rest of this entryRails, Money, Float, Decimal
November 17th, 2009
The problems of using floats to represent monetary values have been well discussed elsewhere. So it sufficeth me to say, “do not ever do it”. Now if you are confronted with this haunting bit of code (written by someone else, of course), and want to correct the elusive $35.000000000000000001 you are charging people then I have good news! It can be done, but the road is not paved. These are the four biggest bumps I’ve run into. They might apply to other styles of AR stores, but these tips are from my experiences with MySQL.
Read the rest of this entryUnpack your unruly gems!
November 13th, 2009
Unpacking Gems doesn’t always work in some projects for various annoying reasons.
So this is just my hammer for the nail.
Read the rest of this entry