Make sure you have enabled the Sandboxed service in your farm to run the sandboxed solution.
Also I would suggest to you to increase the RAM to run the SharePoint 2013. It is not recommendable to run the SP2013 with 5GB of RAM. Read the Hardware and Software requirement
here.