1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD Support for Ruby 1.9.3

Discussion in 'Support' started by fromano, Apr 16, 2012.

  1. fromano

    Joined:
    May 20, 2008
    Messages:
    110
    Likes Received:
    0
    The documentation says:
    The Ruby language is not built into TCC, and must be obtained separately. The versions supported by TCC are Ruby 1.8 and 1.9 (free from www.ruby-lang.org ).

    I have Ruby 1.9.3 Installed
    ruby --version
    ruby 1.9.3p125 (2012-02-16) [i386-mingw32]

    but when I try this in Take Command
    echo %@RUBY[p "hello"]
    TCC: (Sys) Could not load Ruby dll (msvcrt-ruby18.dll)
    p "hello"

    in my ruby installations bin directory I have:
    dir /f d:\ruby193\bin\msvcrt*.dll
    D:\ruby193\bin\msvcrt-ruby191.dll

    I'm running:
    TCC 13.03.46 Windows 7 [Version 6.1.7601]
    TCC Build 46 Windows 7 Build 7601 Service Pack 1
    Registered to Federico Romano - 1 System License


    Am I missing something or is this not working?

    TIA
    - Federico
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    I REALLY hate it when developers change the names of their dlls for no reason ...

    TCC is trying to load the Ruby dll like this:

    if (( hRuby = LoadLibrary( _TEXT("msvcrt-ruby19.dll") )) == NULL ) {
    if (( hRuby = LoadLibrary( _TEXT("msvcrt-ruby18.dll") )) == NULL ) {

    Now it appears I'll have to add yet another LoadLibrary call for yet another meaningless name change. In the meantime, you can copy your msvcrt-ruby191.dll to msvcrt-ruby19.dll.
     
  3. fromano

    Joined:
    May 20, 2008
    Messages:
    110
    Likes Received:
    0
    When I do that and execute %@RUBY[p "hello"], tcc crashes and disappears with no .gpf file, here's the event info from Windows

    Faulting application name: tcc.exe, version: 13.0.3.46, time stamp: 0x4f4853d0
    Faulting module name: tcc.exe, version: 13.0.3.46, time stamp: 0x4f4853d0
    Exception code: 0xc0000005
    Fault offset: 0x0000327e
    Faulting process id: 0x11618
    Faulting application start time: 0x01cd1bfd38169787
    Faulting application path: D:\JPSoft\version13\tcc.exe
    Faulting module path: D:\JPSoft\version13\tcc.exe
    Report Id: 9b00e83f-87f3-11e1-bc76-e4115b316f9e

    as a workaround I'm using this in my script for now:

    %@EXECSTR[ruby -e "p ENV['destinations'].split('/\s/').reverse.join(' ')"]
     
  4. fromano

    Joined:
    May 20, 2008
    Messages:
    110
    Likes Received:
    0
    Here's one more for you python 3.2.2 has a dll called python3.dll not python.dll :-(
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    I installed Ruby 1.9.3 and spent a couple of hours debugging. The Ruby developers did a pretty good job of breaking Windows compatibility with embedded Ruby in the 1.9.3 release. In addition to changing the dll name, they removed some (essential) internal functions and renamed some others. (And didn't document any of the changes!)

    At the least, this is going to require a lot of custom code for 1.9.3, and I don't know if it's going to be possible to get it to work at all. In the interim, you could use the versions that are documented to work with Take Command.

    (For Python, I'm already looking for python31.dll, python27.dll, python26.dll, and python25.dll.)
     
  6. Stefano Piccardi

    Joined:
    May 31, 2008
    Messages:
    376
    Likes Received:
    2
    (off topic) The "Python Support" help topic lists just three of those: "TCC supports version 3.1, 2.6, and 2.5".
     

Share This Page