Feathers works the best, otherwise you can go by a blood test. If you're having blood drawn for other things (e.g. testing to see if they're a carrier of any disease/virus) then you may as well do a DNA blood test at the same time.
Personally, I believe that feather DNA-sexing would be your best bet.
For nail cutting method - I'd be very hesitant to recommend it, because if you cut too far back and don't have anything to stop the bleeding - or if your companion by some freak chance has Haemophilia[1], you could be putting your bird a risk of blood loss. If you do decide this method, be very careful how far back you cut, and have some Kwik-Stop or Corn Flour on hand to stop the blood flow.
As a Side Note:
Although no one here has said it - some "old school" aviculturists would suggest endoscope sexing. I would
never however recommend endoscope sexing - it's traumatic, invasive and can put your bird at risk of injury or death if done improperly. There was an IDIOT "vet" who roamed around US for a while and was charging people $5-$10 on the spot endoscope gender tests for birds. He was doing it in unsanitary conditions and often put the birds at risk risks due to infection or injury.
The only time an endoscope should be used is for checking for internal injuries, for cancers/tumours, etc and in the hands of a qualified and experienced avian vet.
Haemophilia - Wikipedia, the free encyclopedia : a group of hereditary genetic disorders that impair the body's ability to control blood clotting or coagulation, which is used to stop bleeding when a blood vessel is broken. Basically, blood won't clot. I have no idea if birds can contract it, but there have been reported cases of other animals having it.