refactor log model to add user_id, update gemfile