Rails - The system cannot find the path specified

前端 未结 10 1949
天命终不由人
天命终不由人 2020-12-07 11:21

I have installed Rails and Ruby on Windows with railsinstaller. The problem is, when I run the rails command, it gives me: \"The system cannot find the path specified.\"

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 11:38

    Go into C:\RailsInstaller\Ruby2.2.0. In some of the .bat files, you'll find the following:

    @ECHO OFF
    IF NOT "%~f0" == "~f0" GOTO :WinNT
    @"C:\Users\emachnic\GitRepos\railsinstaller-windows\stage\Ruby2.2.0\bin\ruby.exe" "C:/Users/emachnic/GitRepos/railsinstaller-windows/stage/Ruby2.2.0/bin/tilt" %1 %2 %3 %4 %5 %6 %7 %8 %9
    GOTO :EOF
    :WinNT
    @"C:\Users\emachnic\GitRepos\railsinstaller-windows\stage\Ruby2.2.0\bin\ruby.exe" "%~dpn0" %*
    

    Delete that and paste in the text below:

    @ECHO OFF
    IF NOT "%~f0" == "~f0" GOTO :WinNT
    ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
    GOTO :EOF
    :WinNT
    @"%~dp0ruby.exe" "%~dpn0" %*
    

提交回复
热议问题