I have problem with my docker-compose on ruby on rails. when i run
docker-compose run web bundle install
i have information that my gems installed succesfully, but when in next step i run
docker-compose up
then i have information that my container exited with code 1. I looked on docker logs and i get information that
Could not find gem XXXXXXXXX in any list of sources(Bundler::GemNotFound)
what is interesting i don't use this gem.
Moreover when i run bundle install outside container (on my local machine) everything works good. Where could be problem ? Please help
I had the same problem, and I solved it.
What's your bundle version is running the container? You can check it at the last line in Gemfile.lock
"BUNDLED WITH ...". (access with: docker run -ti sfcr_web /bin/bash
and run tail -n 2 Gemfile.lock
Maybe your using a diferent gem version at the local machine/docker container.
You can do gem uninstall xxxx
if you don't need that gem. Also it could be that your changes doesnt' take effect because your docker-compose is not using the last docker image, try:
docker images
, check your previous imagesdocker rmi your_image_name
docker container prune
, to delete your unused containers and start new ones.docker container up
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With