India 's defense ministry says it has successfully tested a nuclear-capable ballistic missile from a ship near the east coast .