Update to Rails 4.
Fix test cases.
Fix assets complie.