Updated Rails version for security fix and limited new gems that breaks tests.

For security bug details see https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion