Specifying Arduino Programmer

I have just started using Arduino. My board is Arduino Uno R3. I am using El Capitan as my Mac OS. I tried to upload the following program to my board after doing the connections:

int ledPin = 10; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); }

I am getting the following error:

avrdude: no programmer has been specified on the command line or the config file Specify a programmer using the -c option and try again

I have already selected the board and port on my IDE correctly but i am still getting the above. Please help me fix the problem!

Are you using Arduino IDE 1.6.8? Other users have reported this issue with that version and it was fixed by upgrading to 1.6.9.

Please use code tags(</> button on toolbar) whenever you post code or warning/error messages.