【问题标题】:Rails not installing with RailsInstalles, despite no error messageRails 未使用 RailsInstalles 安装,尽管没有错误消息
【发布时间】:2016-06-10 21:10:51
【问题描述】:
我已经下载了最新的 Windows 版 Rails Installer .exe。我已经运行它,一切似乎都成功了,检查时我得到以下输出:
$ 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
所以好像没用??为什么会这样?我该怎么做才能补救?
【问题讨论】:
标签:
ruby-on-rails
railsinstaller
railsinstaller-windows
【解决方案1】:
我发现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