Run this command in the terminal for each space you want:
defaults write com.apple.dock persistent-apps -array-add ‘{tile-data={}; tile-type=”spacer-tile”;}’
Reload the Dock with this command:
killall Dock
Now you can move the spaces around in order to group your apps:
