fixed gem build problems and path issue