Tried rails 4

I tried to use rails 4. But there are lots of changes. Haven’t figure
it out yet. Commit this diff patch in case I need it in the feature.