In this paper we study ideals generated by quite general sets of 2-minors of an -matrix of indeterminates. The sets of 2-minors are defined by collections of cells and include 2-sided ladders. For convex collections of cells it is shown that the attached ideal of 2-minors is a Cohen-Macaulay prime ideal. Primality is also shown for collections of cells whose connected components are row or column convex. Finally the class group of the ring attached to a stack polyomino and its canonical class is computed, and a classification of the Gorenstein stack polyominoes is given.