oneclick / rubyinstaller

RubyInstaller for Windows - Build recipes
http://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
1.19k stars 305 forks source link

Replace path checkbox with a question. #278

Open zedshaw opened 9 years ago

zedshaw commented 9 years ago

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.

Azolo commented 9 years ago

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.

Azolo commented 9 years ago

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.

jonforums commented 9 years ago

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.

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 :smile_cat:

Azolo commented 9 years ago

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

voronoipotato commented 8 years ago

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?

Azolo commented 8 years ago

@voronoipotato I doubt it, I'll try to look into it.

voronoipotato commented 8 years ago

In windows it's just "echo %Path%" to get the path variable if you can run commands from the installer.

voronoipotato commented 8 years ago

If we're using installscript you can just call launchappandwait to check for the presence of Ruby in the path.

Azolo commented 8 years ago

Honestly, I don't know enough. If you think you do know then the scripts we build from are here: https://github.com/oneclick/rubyinstaller/tree/master/resources/installer

I would gladly accept a PR or try to help finish some proof-of-concept code though!

voronoipotato commented 8 years ago

Sounds good