Add attach command. Fix gem installation for server.