From: Eric Christopherson Date: 2010-02-24T09:49:54+09:00 Subject: Re: Where is Ruby 1.9 'TK' library? On Fri, Feb 19, 2010 at 3:29 PM, Roger Pack wrote: >> Roger, could you give some more guidance on what gem/extconf switches >> are required to get tk_as_gem built when Tk is installed somewhere >> other than C:\Tcl? > > Looks like I was hard coding it to /Tcl (my bad). > > Give 'er a shot now. > > ex: > > gem install tk_as_gem -- --with-tcl-dir=/installs/Tcl > --with-tk-dir=/installs/Tcl I've finally had success installing tk_as_gem on my home Windows VM and my work Windows machine. It also no longer hangs for long periods of time. On my VM I didn't really have to do anything to make it work, but on my work PC I have everything stored under My Documents since I can't write to C:\. Here is what helped: 1. Upgrade to the newest RubyInstaller package (1.9.1-p378). P243 had a bug where the compilation couldn't finish because it had run out of memory (Errno::ENOMEM). Install the devkit from rubyinstaller.org, if you haven't already. 2. Run gem in a Windows command prompt (cmd) window. I never got it working under MSys. 3. Use "short filenames" (the ones with ~ in them) instead of any file/directory name with spaces. You can find out short filenames in cmd by running dir /x on their parent directories. I couldn't get paths with spaces to work. 4. For convenience, I set a shell variable TCLDIR_. It was set to C:/Docume~1/echris~1/MyDocu~1/Development/Tcl. Note that this has forward slashes instead of backslashes! Gcc doesn't understand backslashes. (The underscore is because I had another variable TCLDIR with backslashes.) 5. Use the command line: gem install --verbose tk_as_gem -- --with-tcl-dir=%TCLDIR% --with-tk-dir=%TCLDIR% I really hope this helps someone. Roger, I don't know if you'd be able to fix things so it can build with pathnames with spaces, or under MSys, but that'd be great. And thanks for the hard work of making this a gem!