Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows cannot detect rails installation #3

Closed
sylhare opened this issue Sep 23, 2017 · 1 comment
Closed

Windows cannot detect rails installation #3

sylhare opened this issue Sep 23, 2017 · 1 comment
Assignees

Comments

@sylhare
Copy link
Owner

sylhare commented Sep 23, 2017

I installed Rails from http://railsinstaller.org/en on my Windows 7 desktop and the installation went fine. However, after installation when I do:

C:\blog>rails --version
The system cannot find the path specified.

It's basically the same problem as #72 in the readme, but I thought making an issue would make it clearer.

@sylhare
Copy link
Owner Author

sylhare commented Sep 23, 2017

So the solution is to overwrite rails.bat because the path was hard coded. Here is the right version to use (also available in the repository in scripts/rails.bat).
The original file is in C:\RailsInstaller\Ruby2.2.0\bin

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"%~dp0ruby.exe" "C:/Users/emachnic/GitRepos/railsinstaller-windows/stage/Ruby2.3.0/bin/rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" "%~dpn0" %*

Thanks to DerJuggernawt

@sylhare sylhare closed this as completed Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant