Ruby Gem not working on windows 10 (x32 x64) - sh: /bin/gem: C:/path/ruby.exe^M: bad interpreter: No such file or directory
Ruby Gem not working on windows 10 (x32 x64) - sh: /bin/gem: C:/path/ruby.exe^M: bad interpreter: No such file or directory
Edit,ex with notepad, the file available in "bin/gem.bat"
(see below)
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/uselesswindowspath/bin/gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*
____
and replace
"C:/uselesswindowspath/bin/gem"
with
"/bin/gem"
Then edit "bin/gem", and replace
#!C:/ruby-2.2.2-x64-mingw32/bin/ruby.exe
with
#!/bin/ruby.exe
Do the dame for any .bat file related to ruby (ex. jekyll) and you should not have other problems.
Edit,ex with notepad, the file available in "bin/gem.bat"
(see below)
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/uselesswindowspath/bin/gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*
____
and replace
"C:/uselesswindowspath/bin/gem"
with
"/bin/gem"
Then edit "bin/gem", and replace
#!C:/ruby-2.2.2-x64-mingw32/bin/ruby.exe
with
#!/bin/ruby.exe
Do the dame for any .bat file related to ruby (ex. jekyll) and you should not have other problems.
Comments
Post a Comment