2

I am using the railsinstaller-3.2.0.exe that I got from the railsinstaller.org site. Although the site says "Rails 4.2", when you download, the filename is as noted above.

The installation seems to proceed normally, but at the end, it shows the Environment Configuration and it is clear that it cannot find the rails.bat file to run rails. The directory is definitely in my path, so is there some other reason why Windows cannot find the file?

Neal Koss
  • 33
  • 1
  • 5
  • 2
    What makes it "clear that it cannot find the rails.bat file to run rails?" Is there some error message that you didn't include? That 3.2.0 is the version of RailsInstaller, by the way, and not the version of Rails that it installs. The webpage makes it clear that it includes Rails 4.2 and Ruby 2.2.4. – MarsAtomic Oct 12 '16 at 00:44
  • Just for fun - http://stackoverflow.com/q/12220024/525478 and http://stackoverflow.com/q/920201/525478... You might consider https://www.virtualbox.org/wiki/Downloads. I know that this does not directly answer your question... – Brad Werth Oct 12 '16 at 01:07

1 Answers1

0

What you're seeing is a complaint about a different path (on some other developer's machine), not your System Path.

RailsInstaller seems to include an unresolved (and continuing) problem with their builds. If you look in your .bat files, you'll find the following lines, which indicate that RailsInstaller is using a hardcoded path that refers to the machine of a specific RailsInstaller developer:

@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"

Any instance of the previous code should be replaced with the following:

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" "%~dpn0" %*

If all else fails and you just don't want to deal with it, the RailsInstaller web page includes multiple versions, so you can just go back and use an earlier version (e.g. use the version with Ruby 2.1.8 and Rails 4.2).

All this having been said, you may find cause to revisit your stance against using virtualization at some point. Many Ruby/Rails libraries are compiled for *nix, and testing against Windows is limited or non-existent, which means you're likely to run into issues sooner or later. It might be wise to at least take a look at Vagrant, etc. now instead of having to change dev environments in the middle of a project.

MarsAtomic
  • 10,436
  • 5
  • 35
  • 56
  • That helped. I will take your advice under "advisement", but right now, I just need an environment for a class and this should fit the bill...thanks – Neal Koss Oct 12 '16 at 05:22
  • Following the railsinstaller instructions, it advises "gem install rails --no-document" I get an error – Neal Koss Oct 12 '16 at 06:07
  • continuing the above. Here is the error....ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) My rails version shows as 4.2.5.1 and the instructions say it should be able to upgrade using the gem to 5.0.x – Neal Koss Oct 12 '16 at 06:09