1. Preheat oven to 400 degrees.
2. Trim the ends off the green beans and rinse well. Place in a bowl and set aside.
3. In a small skillet, heat olive oil until it is warm. Add garlic and dried rosemary, remove from heat, and allow to sit for 10 minutes then add to the bowl with the green beans. Toss the green beans until well coated and spread out into a single layer on a baking tray or roasting pan.
4. Roast until the green beans are tender and slightly blistering, 25 to 30 minutes. Remove from oven and transfer to a serving platter.
5. Place pecan pieces in a dry skillet over medium heat. Toast pecans, stirring often, until fragrant and toasted, 3 to 4 minutes.
6. Sprinkle pecans and pepper over the green beans and serve while still hot.