update gem version
use different protocol based on port