Rails - 系统找不到指定的路径 [英] Rails - The system cannot find the path specified
问题描述
我已经使用 railsinstaller 在 Windows 上安装了 Rails 和 Ruby.问题是,当我运行 rails 命令时,它给了我:系统找不到指定的路径."
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."
我运行的是 Windows 7 x64 和 Ruby 2.20.
I am running windows 7 x64 and Ruby 2.20.
我尝试卸载 Rails 并重新安装;那没有帮助.Ruby 命令可以像 ruby -v
一样执行,但是 rails -v=
不起作用.
I tried uninstalling Rails and installing it again; that does not help. Ruby commands execute, like ruby -v
, but rails -v=
dont work.
推荐答案
进入 C:\RailsInstaller\Ruby2.2.0.在某些 .bat 文件中,您会发现以下内容:
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" %*
这篇关于Rails - 系统找不到指定的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!