basic fixes for rails 3 - so far it's working
Merge branch 'rails3'