No SIM Card detected, Emergency Call Only After Flashing Custom ROM AND Stock ROM [Sony Xperia AcroS]
EDIT: This fix was temporary. The problem returned the next day. Sorry.

After I flashed Cyanogenmod 12.1(upgraded to lollipop) to my nexus 5 I had the "no Sim Card". It is a very popular problem for this ROM or Lollipop in general. I try shimming the sim, Updating PRL etc... and nothing was working.

Here is what I think finally fixed it for me:

In dialer keypad: *#*#72786#*#*     (this will wipe the carrier settings)

reboot if your phone didn't automatically. Your phone will go through activation in about 5 minutes, re-gathering the correct carrier settings just like when you first bought it.

Tip was found here:
https://help.ting.com/hc/en-us/articles/205428508-Completing-Activation-for-Your-Nexus-5-or-6

Hope this helps someone, anyone.