add rack-rewrite gem and hookup middleware in config.ru