Update to rails 4.

Haven't fixed any warning yet.