rails 4 fixes
Fix problem due to the difference of the implementation of Ruby 1.9.x and 2.0.0
Merge branch 'spike'