solved the devise key error and added the 12factor gem