Project

General

Profile

Bug #12066

Ruby creates Wrong .Bat files

Added by businessgamer8 (Kevin Marti) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
[ruby-core:73782]

Description

After i downloaded the newest version of Ruby and installed SASS, i tried to run SASS from the command line.
This gave me following error:

Der Befehl """C:\Program" ist entweder falsch geschrieben oder
konnte nicht gefunden werden. (In German, but important part is the bold one.)

it says command not found...

So i debugged the sass.bat file and saw that there is a " too much.
I modified the file from:

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@""C:\Program Files\Ruby22-x64\bin\ruby.exe" "C:/Program Files/Ruby22-x64/bin/sass" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@""C:\Program Files\Ruby22-x64\bin\ruby.exe" "%~dpn0" %*

to:

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"C:\Program Files\Ruby22-x64\bin\ruby.exe" "C:/Program Files/Ruby22-x64/bin/sass" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"C:\Program Files\Ruby22-x64\bin\ruby.exe" "%~dpn0" %*

Now it works fine. To mention is, that i installed ruby under C:\Program Files and not in the root directly.

So i think the .Bat-Creator is making something strange while writing the file.

I hope you can fix it, so other Peoble dont have to modify every additional bat file.

Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Status changed from Open to Closed
  • Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: DONTNEED

It has been fixed by the upstream, and imported to 2.3.

Updated by usa (Usaku NAKAMURA) over 4 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: DONTNEED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONTNEED

Updated by usa (Usaku NAKAMURA) over 4 years ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONTNEED to 2.1: DONTNEED, 2.2: REQUIRED, 2.3: DONTNEED

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: REQUIRED, 2.3: DONTNEED to 2.1: DONTNEED, 2.2: DONE, 2.3: DONTNEED

I've cherry picked the https://github.com/rubygems/rubygems/commit/f9232680 from r49511 into ruby_2_2 branch at r54337.

Also available in: Atom PDF