Some environmentally safe ways of getting rid of rats are to use traps, either lethal or catch and release, or sticky strips. You can also fight nature with nature and have a house or barn cat rid you of your rat problem.
There are many different types of rat traps on the market that do not harm the environment. The traditional spring trap uses no harsh chemicals -- just a deadly, trigger-released bar that snaps down when the trigger is activated. These traps almost always kill instantly and are one of the most green options. Choose the heavier-duty plastic or metal traps that can be cleaned, as opposed to the flimsier, wooded variety sold in multi-packs.
New to the market is the electrocution trap, which uses water and electricity to kill the rats. The trap is enclosed, so you do not have to see the dead rat, but the method of killing is not as humane as the traditional trap. If you wish to catch the rat alive and release it afterwards, the catch and release, two-door trap is effective. While this trap is very environmentally safe, you have to release the rat far from its familiar territory to prevent it from coming back into your attic.
Sticky strips are effective and considered "green," but they do mean the rat will suffer. The rat walks on the strips and becomes stuck to the paper. It will then die of dehydration, or you must kill it yourself. If the space is safe enough for a cat, consider letting a proven hunter do the task. A trained cat can quickly and effectively kill a moderate rat problem in your attic with no environmental consequences.