George Edwards
George Edwards

Reputation: 9229

Rails not installing with RailsInstalles, despite no error message

I have downloaded the latest Rails Installer .exe for windows. 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?

Upvotes: 1

Views: 803

Answers (1)

George Edwards
George Edwards

Reputation: 9229

I found out that the content of rails.bat which is in 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

Upvotes: 3

Related Questions