Getting "Could not install gems:no SDK specified" when trying to run any command such as starting the rails server. Why am I getting this and how can I get around it?  

I've had issues before with the JDK but not seen this SDK error.

![enter image description here](https://i.stack.imgur.com/jCOF8.png)