Bin/rails:permission denied error

I have developed a rails project and pushed it on github to deploy it.But i am facing the following error while deploying the project in render…Although the project is running well locally… For clarification::I have added render-build.sh file in my bin folder and also added render.yaml and pushed them also into the git repo…I have followed every instruction given on the documentation…
log:

Apr 26 01:32:42 AM==> Build failed :disappointed:

Apr 26 01:32:42 AMbash: ./bin/rails: Permission denied

Apr 26 01:32:40 AMBundled gems are installed into /opt/render/project/.gems

Apr 26 01:32:40 AMGems in the groups ‘development’ and ‘test’ were not installed.

Apr 26 01:32:40 AMBundle complete! 14 Gemfile dependencies, 68 gems now installed.

Apr 26 01:32:39 AMI, [2024-04-25T19:32:39.682921 #1141] INFO – : Writing /opt/render/project/src/public/assets/actioncable.esm-06609b0ecaffe2ab952021b9c8df8b6c68f65fc23bee728fc678a2605e1ce132.js.gz

Apr 26 01:32:39 AMI, [2024-04-25T19:32:39.682863 #1141] INFO – : Writing /opt/render/project/src/public/assets/actioncable.esm-06609b0ecaffe2ab952021b9c8df8b6c68f65fc23bee728fc678a2605e1ce132.js

Apr 26 01:32:39 AMI, [2024-04-25T19:32:39.682787 #1141] INFO – : Writing /opt/render/project/src/public/assets/actioncable-1c7f008c6deb7b55c6878be38700ff6bf56b75444a086fa1f46e3b781365a3ea.js.gz

Apr 26 01:32:39 AMI, [2024-04-25T19:32:39.682725 #1141] INFO – : Writing /opt/render/project/src/public/assets/actioncable-1c7f008c6deb7b55c6878be38700ff6bf56b75444a086fa1f46e3b781365a3ea.js

Hi there,
Switch out bin/rails for bundle exec rails and you’ll be fine,

Regards,

1 Like

how to do that I am also facing same problem? did you mean I need to put ’ bundle exec rails ’ in render-build.sh file?

That’s correct - we show this in our docs at https://docs.render.com/deploy-rails#create-a-build-script

Regards,