Don't forget to put the shifter into the smallest cog (most cable payed out) position before attaching the cable to the derailleur. You should also check the condition of the cable and housing and clean/lube/replace as needed. Pay special attention to the last run of housing as it tends to pick up water and crud from the road.