From: Roger Pack on
> 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



> Also, is there anything I can do to help diagnose the hanging problem
> that happens on my other computer (which does have C:\Tcl)?

Typically for me this has meant I don't have tk84.dll in my path.

You can make sure it is using the whichr gem, if desired.
c:\dev_old>gem install os whichr
c:\dev_old>whichr tk*.dll -a
higher in the list is executed first
e:\Tcl\bin\tk84.dll (is not executable)

(it should show one)
-r
--
Posted via http://www.ruby-forum.com/.

From: Eric Christopherson on
On Fri, Feb 19, 2010 at 3:29 PM, Roger Pack <rogerpack2005(a)gmail.com> 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!

From: Alex DeCaria on
Roger Pack wrote:
>
>> 'ERROR: Error installing tk_as_gem:
>> ERROR: Failed to build native extension.'
>>
>> Any idea what may be wrong? I have both Tcl and Ruby 1.9 installed on
>> my C: drive.
>
> My first guess is that you don't have the devkit installed (if gcc
> --version works then you do, though). We'll probably need more info,
> like put your mkmf.log output into a pastie and post the link back here
> or what not.
> GL!
> -r

Roger,

I'm still trying to get tk_to_gem to work on my 64-bit windows. I made
sure devkit was installed, and gcc --version works. I'm getting the
same error message. I can't seem to locate the mkmf.log file. It
doesn't even seem to be created (I did a search of my entire harddrive
and only found mkmf.log files for other installs I've done).

As mentioned before, it worked fine on my other (32-bit) system. Would
there be any 64-bit issues with tk_as_gem?

--Alex
--
Posted via http://www.ruby-forum.com/.

From: Roger Pack on

> I'm still trying to get tk_to_gem to work on my 64-bit windows. I made
> sure devkit was installed, and gcc --version works. I'm getting the
> same error message. I can't seem to locate the mkmf.log file. It
> doesn't even seem to be created (I did a search of my entire harddrive
> and only found mkmf.log files for other installs I've done).

What's the full output? Do you have 32 bit versions of tk and ruby
installed, I assume?
-rp
--
Posted via http://www.ruby-forum.com/.

From: Alex DeCaria on
Roger Pack wrote:
> What's the full output? Do you have 32 bit versions of tk and ruby
> installed, I assume?
> -rp

I have ActiveState Active Tcl8.4.19.1 installed, along with Ruby
1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]. Ruby is working
fine with my other apps, and the Active Tcl is working fine with my TK
apps if I run them under Ruby 1.8.6.

Ruby 1.9 is my default installation (confirmed by ruby -v).

When I type gem install tk_as_gem I get:
'Building native extensions. This could take a while...
ERROR: Error installing tk_as_gem:
ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb

Gem files will remain installed in
C:/Ruby19/lib/ruby/gems/1.9.1/gems/tk_as_gem-0.1.0 for inspection.
Results logged to
C:/Ruby19/lib/ruby/gems/1.9.1/gems/tk_as_gem-0.1.0/gem_make.out'

The contents of the gem_make.out file are just 'C:/Ruby19/bin/ruby.exe
extconf.rb'

I do have devkit in the Ruby19 directory, along with the appropriate
/bin stuff from devkit.

Other gems install fine. I currently have fxruby and RMagick gems
installed and they are working fine. My gem environment is 1.3.6.

--Alex
--
Posted via http://www.ruby-forum.com/.