Yesterday when attempting to initialize /.init
a Docker Container (for the first time) I got a strange error that I just assumed was down to my set up. Hadn't yet spun this up on my new machine.
The failure occurred when hitting exec bundle exec rake db:create
.
The error output:
Gem::Exception: can't find executable rake for gem rake. rake is not currently included in the bundle,
perhaps you meant to add it to your Gemfile?
Pretty baffling?! After a bit of digging, it turns out I had an image without any code in it!
cat Gemfile
showed it was completely empty!
I deleted the image and re-pulled to fix this issue.
- Check out all the images (if you have multiples)
docker image list
- Remove the file from the compose file with the issue
docker-compose rm <image-name>
- Remove the image with it's sha
docker image rm <sha>
- Pull down the image again
docker-compose pull <image-name>
Heh, now I have another issue ;)