Uday's website
Published on Uday's website (https://uday.net)

Home > Rails warning shebang line ending with \r - Lessons Learned 8

Rails warning shebang line ending with \r - Lessons Learned 8 [1]

Submitted by uday [2] on March 6, 2023 - 3:02pm

I was getting following error.

$ rails s
/home/uday/.rbenv/versions/2.7.5/bin/ruby: warning: shebang line ending with \r may cause problems

How I fixed it?

I navigated to the ruby file located in the bin folder(bin/rails). At the bottom of the Visual Studio Code editor(status bar), you should be able to see a button CRLF(control character). Click on it and change it to LF.

This is because Windows uses by default uses the CRLF control character and now that you are using a Windows subsystem for Linux, the control character should be LF

Rating: 

 Valid XHTML 1.0 StrictCreative Commons LicenseVerbatim copying and redistribution of this entire page are permitted provided this notice is preserved. All content on this website including archives (including text, photographs, audio files and any other original work), unless otherwise noted, is licensed under a Creative Commons License or later.


Source URL:https://uday.net/node/621

Links
[1] https://uday.net/node/621 [2] https://uday.net/user/1