From: Ronald Fischer Date: 2007-05-16T00:41:43+09:00 Subject: Coexistency Problem: cygwin + Ruby for Window (and suggestion for improving the Ruby installer) I just would like to point out a problem when installing Ruby for Windows and Cygwin on the same system: The installer of the Windows version of Ruby creates - at least on systems using a keyboard with European layout - a file named inputrc.euro in the bin directory of Ruby. As far I can tell, interactive Ruby tools (that is: irb) are using the file (via readline.dll) to access characters such as '[' or '}', which need to be accessed using the 'AltGr' modifier on European keyboards. In order that readline.dll can find this configuration file, the environment variable INPUTRC on the system is silently set to this path. This causes problems when the Cygwin package is also installed. Cygwin installs on the desktop an icon to launch a window running the bash shell, and bash also comes with its version of readline. The standard for all readline programs requires that, if the environment variable INPUTRC is set to some valid file name, that file is read for customizations; if this environment variable is NOT set, but the file $HOME/.inputrc exists, *that* file is read customizations. In every other case, readline is not customized and uses just its default behaviour. A Cygwin user customizes therefore the readline behaviour by editing .inputrc in his/her home directory. But when Ruby for Windows is installed, bash (when started) sees that the environment variable INPUTRC exists, but does not point to a valid file (because the windows syntax for specifying a file path is not valid in Cygwin), and bypasses the definitions in ~/.inputrc. The only workaround I can think of, goes like this: Instead of using the standard Cygwin way to launch a Cygwin bash shell from the desktop (this goes via a batch file cygwin.bat), one can write his own Cygwin-bash-startup file, which unsets INPUTRC before calling bash. However, Cygwin users don't expect that other systems "under the hood" change the Windows environment in such a way. I therefore suggest that either (1) the installer for Windows Ruby points out in the installation dialogue explicitly that it is changing the Windows environment by inserting a variable INPUTRC (and Cygwin users will then at least know what is going on), or (2) those Batch files in the Ruby distribution, which need INPUTRC, set the environment locally. Of course this would mean that the installation program has to "rewrite" those files (such as irb.bat) to contain the necessary "set INPUTRC=C:\MYRUBYDIR\bin\inputrc.euro". Any opinions on that matter? Ronald -- Ronald Fischer Phone: +49-89-452133-162