Upgrade to Rails 4.1

Related to #166 and #197.