Added sorting to ruby. Fixed setup script

Now with 100% more working sorting!