2016-02-27 60 views
1

我已下载最新的Rails Installer.exe for windows。我已经运行它,一切似乎已经成功地工作,我得到检查时的输出如下:尽管没有错误消息,RailsInstalles仍未安装Rails

$ ruby -v 

ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32] 

$ gem install rails 

Successfully installed rails-4.2.5.1 

Parsing documentation for rails-4.2.5.1 

Done installing documentation for rails after 1 seconds 

1 gem installed 
$ rails new app 
The system cannot find the path specified 

所以它似乎没有工作?为什么会这样,我能做些什么来补救它?

回答

3

我发现这是rails.bat的内容C:\RailsInstaller\Ruby2.2.0\bin has the wrong path.

@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/rails" %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" %* 

所以C:\Users\emachnic\GitRepos\railsinstaller-windows\stage\Ruby2.2.0\bin\ruby.exe必须是C:\RailsInstaller\Ruby2.2.0\bin\ruby.exe

相关问题