Gears are tricksy things. To set them you need to hold the derallieur against its spring, set the shifter to match the gear the derallieur is hovering over in that position, and then tighten the cable holding bolt. Adjust the adjuster screws to stop the chain from going over the top of the bigger ring or off the side of the smallest ring, and that should do it.
Or, if you're not a gear fan, go for singlespeed.