Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

env: ruby\r: No such file or directory

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

Could someone help me?

like image 562
Igor Babkin Avatar asked Mar 16 '15 09:03

Igor Babkin


1 Answers

For macOS users

Step 1: HOMEBREW_NO_AUTO_UPDATE=1 brew install dos2unix
Step 2: git config --global core.autocrlf input
Step 3: find ./ -type f -exec dos2unix {} \; (in the repo you were trying to run your task on)

git add and git commit
You are good to go!

like image 195
tashi yangchen Avatar answered Sep 24 '22 16:09

tashi yangchen