I have Rails project. When I try to run any rake task or rails server it give me this error
env: ruby\\r: No such file or directory
If you are working on a Unix / Mac, then this error is because you have incorrect line endings.
Here is a solution using dos2unix
; you may need to install this program on your system. If apt
is available, you can use sudo apt install dos2unix
.
git config --global core.autocrlf input
find ./ -type f -exec dos2unix {} \;
This will cycle through all of your files, converting them. and solving the problem. Add your changes. Commit them, and you should be good to go.