How to stop metal bar from rotating?
The bar is rotating because there is little friction between the bar and your supports.  Glue some soft rubber strips on the supports where the bar sits and you'll be all set.
On a side note, one limitation a lot of people have in strength training is in their grip strength.  This is manifest by the ubiquitous use of lifting straps.  If your grip is strong you won't need to prevent the bar from rolling.  That said, to each his own.