Fix attach_gem and attach_gems methods