fix gem install code issue