简体   繁体   English

尽管没有错误消息,但Rails没有安装RailsInstalles

[英]Rails not installing with RailsInstalles, despite no error message

I have downloaded the latest Rails Installer .exe for windows. 我已经下载了最新的Windows Rails安装程序.exe。 I have run it and everything seems to have worked successfully, I get the following output when checking: 我运行它,一切似乎都成功,检查时我得到以下输出:

$ 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

So it seems that it hasn't worked?? 所以它似乎没有奏效? Why is this and what can I do to remedy it? 为什么这样,我该怎么做才能解决它?

I found out that the content of rails.bat which is in C:\\RailsInstaller\\Ruby2.2.0\\bin has the wrong path. 我发现在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" %*

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM