Fixed errors to pass tests
Updated Rails to the current HEAD (4.1.0beta)