Walk her out in hand. Go on a "hike" with her on the trail, just her halter on. Take a whip if you need to, and a pocket full of treats. When she acts up, correct her firmly and quickly, make her stand until she's quiet, then praise her and give her a treat and keep moving! Make the walk fun, let her graze some when she's good. On the way home, make her walk quietly. If she won't walk her in a circle at that spot until she'll walk quietly, then keep going. If walking in a circle doesn't work, then turn her to face away from the barn and just stand there until she settles down. Then praise her and give her a treat, and keep going.
When you get back to the barn, don't put her up right away. Work her on the lunge or in the round pen, then tie her up and let her stand for 30-90 minutes. While she's standing, do some tack cleaning or whatever, or bring a book. Make sure you can see her, but you're still away from her. Don't let her off the post (or whatever you have her tied to) until she's standing calmly. Then praise her, give her some treats, and turn her out.
Rinse and repeat the above until she no longer acts up when going away from the barn. THEN you can try riding her again. If she rears on you, get off and continue in hand until calms down, then get back on. If she rears or acts up again, get off again. Just keep moving away from the barn. Eventually, you should be able to control her from the saddle without having to get off. Just don't forget to praise her when she is doing right.