If you want to stick some apes in a can and send them to nearby parts of space for short periods of time, you can do that without doing much ecology - send enough oxygen and water, and recycle them a bit if you want to support slightly longer missions.
But if you want a long-term space colony, whether it's on a planet/moon/asteroid where you've got some natural resources, or in outer space where you've only got solar energy, you've got to build a sustainable ecosystem, with plants that provide food and oxygen, some way to grow some medicines, some way to make dirt or equivalent for plants to grow in. So far, we haven't even built a human-supporting terrarium that worked without cheating. Biosphere II was really useful, because it failed, and it's the biggest that's been tried. We also don't really know what nutrients humans need - we can do most of the important ones, and you can live mostly adequately off beans and corn and green leaves, but that doesn't mean we've really got everything covered, or waste disposal handled adequately, weird viruses not showing up in the air supply, weird fungi not growing behind the instrument panels, plant diseases not killing off your near-monoculture, etc.
We're not vaguely close to being able to set up a Mars colony. We've got to learn to terraform a planet first, and the only one we've tried it on (Earth) isn't going very well; we haven't even found the thermostat yet.