Update Ruby and Rails versions

* Remove Ruby 1.8.7 support
* Update Rails version to 4.0.0