A number of things were both: the railway bubble was pretty bad for investors even if railways were a genuinely transformative technology that remains in use.
https://en.wikipedia.org/wiki/Railway_Mania : for "railway" substitute "data center".