update gemfile and fix reading model to fix build