State machine is a great gem, unfortunately it’s not working with Rails 4.1. If you upgrade your app and try to use it, you’ll end up with following error: Here’s a fix. Just put it into your initializers: Note: It works also for any non-Rails, ActiveModel based apps.

Read more at the source