I’m not quite sure why you’re having that problem, but you’ll experience considerably less pain if you do it this recommended way: Install Discourse for development using Docker
See also, Can Discourse ship frequent Docker images that do not need to be bootstrapped? - #6 by fbender