Ergodicity in the mean refers to the ensemble mean being the same as the temporal mean, i.e. measuring one process 1000 times will give the same average as a single measurement of 1000 different processes.
One way for a process to not be ergodic in the mean is when there's some sort of barrier, as sibling comments allude to.
Another is if the overall mean value is picked randomly each time the process starts, but is different each time the process runs. So for example personal monthly expenditures are not ergodic in the mean, because some people are born into circumstances that make them wealthy, and they will on average spend more each month than people not born into such good circumstances.
The ensemble average will tend towards people's average spending, while the temporal average will tend towards each individual's spending.