2016-02-27 58 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

相關問題