Update Ruby and Rails versions

* Remove Ruby 1.8.7 support
http://www.ruby-lang.org/en/news/2013/06/30/we-retire-1-8-7/

* Update Rails version to 4.0.0
http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/