rebuilding jcastle in rails4 foundation5