Bundle exec doesn't work in rails app inside docker, Locals gems lists everything fine


I have been having a hard time getting my CI/CD to work back up after some modifications to the docker-compose file, I am using now ruby:2.6.9-alpine3.15 image to set up my docker container.

After successfully building docker-compose (it has a bundle install RUN step), once i try to start the server with this command

CMD bundle exec puma -C config/puma.rb

it has puma not found & wierdly it says /home/circleci is not a directory.

clearly bundle is pointing to a wrong directory even when inside the correct one, gem list gives me all the local installed gems.