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

时间:2016-02-27 16:30:02

标签: ruby-on-rails railsinstaller railsinstaller-windows

我已经下载了最新的Windows Rails安装程序.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

所以它似乎没有用?为什么这样做以及我该怎么做才能解决它?

1 个答案:

答案 0 :(得分:3)

我发现了C:\RailsInstaller\Ruby2.2.0\bin has the wrong path.

中的rails.bat的内容
@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