finished k means method and redirected app.rb homepage