It isn't minerals we're running out of. If we, as a species, expect to survive, we're going to have to stay at a population below the carrying capacity of this planet. Failing that (and we are failing badly, a fact barely disguised by petrochemical fertilizers) we need to spread. There's good reason to believe that Mars can be terraformed (imperfectly, since there won't be adequate natural magnetic shielding against radiation). Colonization technologies are what we desperately need to work on. Mining's the easy part once we're there; food and water are a little more difficult to dig for.