Restrict rails to ~> 4.0.  4.1.0 causes errors with mailboxer

ActiveRecord::StatementInvalid:
       SQLite3::SQLException: near "*": syntax error: SELECT
       COUNT(DISTINCT conversations.*, DISTINCT conversations.*) FROM
       "conversations" INNER JOIN "notifications" ON
       "notifications"."conversation_id" = "conversations"."id" AND
       "notifications"."type" IN ('Message') INNER JOIN "receipts" ON
       "receipts"."notification_id" = "notifications"."id" WHERE
       "notifications"."type" = 'Message' AND "receipts"."mailbox_type"
       = 'inbox' AND "receipts"."trashed" = 'f' AND "receipts"."deleted"
       = 'f' AND "receipts"."receiver_id" = 1 AND
       "receipts"."receiver_type" = 'User' AND "receipts"."is_read" =
       'f'