HTC one M8 won't flash RUU or unlock Bootloader
You will need to unlock the bootloader of your m8 before being able to flash any RUU or custom ROM on it.

In order to do that, I suggest you to visit the XDA forum for the m8 - bootloader threads (XDA is clearly the best site for anything phone related), and try to find one of the many ways to do it that suits your phone and its current state (you might have to change the bootmode - it is now on fastboot).

Best of luck.