Ruby Installed but Rails is Still "cannot find the path"

999 views
Skip to first unread message

Avy Ferguson

unread,
Jul 27, 2016, 8:23:19 PM7/27/16
to RailsInstaller
Help please. 
Running Win10 if that matters.
I've read some back posts and I've tried a completely uninstalling and reinstalling. 
Then tried just uninstalling rails and reinstalling (via gem) and still can't get rails to verify installation or be usable. 



C:\Sites>gem uninstall rails

Select gem to uninstall:
 1. rails-4.2.5.1
 2. rails-5.0.0
 3. All versions
> 3
Successfully uninstalled rails-4.2.5.1
Successfully uninstalled rails-5.0.0

C:\Sites>gem install rails
Fetching: rails-5.0.0.gem (100%)
Successfully installed rails-5.0.0
Parsing documentation for rails-5.0.0
Installing ri documentation for rails-5.0.0
Done installing documentation for rails after 0 seconds
1 gem installed

C:\Sites>ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]

C:\Sites>rails -v
The system cannot find the path specified.

C:\Sites>

Avy Ferguson

unread,
Jul 30, 2016, 9:47:22 PM7/30/16
to RailsInstaller
Fred Oliver posted in another thread and others confirmed it works so I'm trying it. 
Here's his fix:
change the file contents to:


@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*

Avy Ferguson

unread,
Jul 30, 2016, 9:52:07 PM7/30/16
to RailsInstaller
Another user posted a list of other files needing this change:

List of .bat files with this bug:
bundle.bat
bundler.bat
erubis.bat
nokogiri.bat
rackup.bat
sass.bat
sass-convert.bat
scss.bat
sprockets.bat
sqlite3_ruby.bat
thor.bat
tilt.bat

Jonathan Arp

unread,
Sep 14, 2016, 9:24:32 PM9/14/16
to RailsInstaller
has this been updated in the executables yet or do we still need to do this?

thanks.

Avy Ferguson

unread,
Sep 14, 2016, 9:40:24 PM9/14/16
to railsin...@googlegroups.com
I think it still has to be done. not sure, but a quick peek will tell you. Happy coding!

--
You received this message because you are subscribed to a topic in the Google Groups "RailsInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/railsinstaller/L2ZkqB4mfcg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to railsinstaller+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ayush Sharma

unread,
Oct 17, 2016, 9:38:53 PM10/17/16
to RailsInstaller


in which file i have to add this location and name of the file please

Boris Pinto

unread,
Nov 6, 2016, 10:48:48 AM11/6/16
to RailsInstaller
En cada uno de los archivos indicados deben hacer la corrección teniendo cuidado de de colocar el nombre correcto en ???????????????
Es decir bundle, bundler, erubis, nokogiri, etc.. respectivamente

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "???????????????" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*

John Pratt

unread,
Nov 7, 2016, 10:57:45 AM11/7/16
to RailsInstaller
I'm having the same kind of problem
I am new to Ruby on Rails and just installed RailsInstaller on my Windows 7, but when i do this, the program shows the following: 



C:\Sites>rails new myrubyblog
The system cannot find the path specified.                       

Please fix the problem.
John


On Wednesday, July 27, 2016 at 8:23:19 PM UTC-4, Avy Ferguson wrote:

Hans

unread,
Jan 21, 2017, 2:54:01 PM1/21/17
to RailsInstaller
Hola, 

En mi caso tuve que añadir el % después del igual 

@ECHO OFF
IF NOT "%~f0" == "%~f0" GOTO :WinNT
@"ruby.exe" "rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %

Tambien estoy revisando todos los ficheros .bat
Message has been deleted
Message has been deleted

Ian Smith

unread,
Jan 27, 2017, 11:36:57 AM1/27/17
to RailsInstaller
@Avy, Can you define "the file"? Which file(s) need to be changed and relative paths to them? Is the code above simply appended to the file, or is it replacing something? Also, can you post a link to the other thread that pertains to this? Thanks

mike garcia

unread,
Mar 2, 2017, 8:28:43 PM3/2/17
to RailsInstaller
Hi I'm new to ruby on rails (new to ruby altogether)
I tried the package install and had the same issue....but I solve it by simply running 

gem install rails       //Boom! I was extremely happy. Definitely faster than to alter every of the files mentioned in previous post.

Hope this solves the issue for everyone.
Mike Garcia

Timanator *

unread,
Mar 18, 2017, 11:41:33 AM3/18/17
to RailsInstaller
Mike's solution to reinstall Rails package worked for me. It placed all the exe in to the directories that was empty previously.
Reply all
Reply to author
Forward
0 new messages