Hello, I know this is a long shot, but I would like to request a change to your installer that will make it friendlier to beginners who are installing ruby for the first time.
Rather than have a check box which asks whether to put it in the PATH, you should have a panel in the install that asks:
"Is this your first install of Ruby on this computer?"
Then two buttons or check boxes that read:
[Yes, this is my first install. Yes, please add Ruby to my PATH.]
[No, this I have multiple versions installed. No, do not add Ruby to my PATH.]
Then with text that explains:
"Adding Ruby to your PATH will make it available to PowerShell and cmd.exe. If this is the first time you're installing Ruby then choose the first option."
Then, do not default to either option and require a selection before continuing, or check the path to see if a ruby is already installed and adapt this panel accordingly. For example if you find a Ruby then default to No and tell them that you found a version of Ruby already and where you found it.
The reason for this install is that when people who know nothing about Ruby use this installer the default option means they don't have it installed in their path and therefore can't use it from PowerShell. For the total beginner, such as people reading my book, this is a complete show stopper and they usually give up before they've even started.
I wouldn't be opposed to an option like that.
If someone created a pull request it would be a consideration. Which basically means that I don't have plans to do it myself.
Sorry if that sounded crass. I would like to work on it, but there are other things that I'd rather work on than the actual installer. It's a bit of a pain to mess with.
This request makes the flawed assumption that it's generally a good idea for people installing ruby on Windows for the first time to put ruby on their PATH.
Given that DLLs in the ruby's bin dir may conflict with other versions already on a users PATH, the suggestion "Yes, this is my first install. Yes, please add Ruby to my PATH...If this is the first time you're installing Ruby then choose the first option." could lead to subtle and frustrating debug problems depending upon what the user already has installed and on their PATH.
"Yes, this is my first install. Yes, please add Ruby to my PATH...If this is the first time you're installing Ruby then choose the first option."
Generally safer options for end users include (a) create a desktop shortcut that brings MRI on PATH in a more controlled way, and (b) use a Windows-friendly, multi-platform ruby version manager like uru. Granted, both of these are a bit more inconvenient for basic usage in which a user's PATH is free of speedbumps.
The challenge with installers is finding a way to do just enough while minimizing the assumptions you make about the unique (potentially odd) environment of end user's systems. Make too many assumptions and you create odd corner case breakages that irritate users and make product support harder.
This issue seems better solved with documentation targeted to new users rather than embedding more assumptions into the installer. The doco can provide better context to the issue than a couple sentences jammed into the small real estate of an installer. Of course, we all know that everyone reads doco all the time 😸
@jonforums also has an extremely valid point.
I think one of the big problems is that a lot of the "newbie" problems aren't specific to Ruby.
I mean an explanation as to what the options do would be nice, but experience shows that people don't read that much either.
But a Ruby enabled prompt shortcut like what VS does would probably be the best surefire way outside of forcing uru on people, which also seems like not a terrible idea.
Yeah I actually got here because I thought the path was checked by default and thought the installer was broken, uninstalled and reinstalled and just realized that it was unchecked by default.
Is it not possible to check and see if ruby is currently in the path?
@voronoipotato I doubt it, I'll try to look into it.
In windows it's just "echo %Path%" to get the path variable if you can run commands from the installer.
If we're using installscript you can just call launchappandwait to check for the presence of Ruby in the path.
Honestly, I don't know enough. If you think you do know then the scripts we build from are here:
I would gladly accept a PR or try to help finish some proof-of-concept code though!