What is the right way to include the Ruby DevKit?

Claudius's Avatar

Claudius

16 Jul, 2015 09:35 AM

I am trying to build a few ruby gems on appveyor and most of them will need the ruby DevKit. I have seen that it is available on appveyor, but i don't see a "general" way to include it. I tried this in my YAML:

> install:
> - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
> - C:\Ruby%ruby_version%\DevKit\devkitvars.bat

The result ( https://ci.appveyor.com/project/ccoenen/wdm/build/5 ) was a working build on ruby 2.1, but failed build on all other versions.

Is there a general rule to where the "correct" devkit should be?

  1. Support Staff 1 Posted by Feodor Fitsner on 16 Jul, 2015 03:33 PM

    Feodor Fitsner's Avatar

    Good catch. Indeed, for all Ruby 2.x versions DevKit is installed in a single location C:\Ruby21\DevKit.

  2. 2 Posted by Claudius on 16 Jul, 2015 04:53 PM

    Claudius's Avatar

    I would like to suggest putting it in every ruby installation. The reason for that is, that it's often interesting to test a gem (a ruby library package) against a lot of ruby environments. For that, we're using these lines in our appveyor.yml

    > environment:
    > matrix:
    > - ruby_version: "21"
    > - ruby_version: "21-x64"
    > - ruby_version: "22"
    > - ruby_version: "22-x64"
    > ... and so on

    that's also why i constructed the path with C:\Ruby%ruby_version%\DevKit - so the appropriate devkit can be loaded.

    Currently, i'm not certain how I would load the correct ruby 2.2 devkit while keeping the 32bit version in 32bit and the 64bit version in 64bit. (or any other ruby, for that matter). This gets even more complicated when adding the (granted, dated!) ruby 1.9 into the mix. 1.9 needs the devkit...-4.5.2

    Having the DevKits available would be extremely useful, as building gems is one of the points of failure for ruby gems on windows.

  3. 3 Posted by Claudius on 16 Jul, 2015 05:10 PM

    Claudius's Avatar

    I just found this other thread ( http://help.appveyor.com/discussions/questions/542-matrix-of-platforms-and-environments )

    this would probably work, too, but then i think the DevKits should be directly in C:\ - having them in one - seemingly - random ruby version is a little complicated.

    On my personal dev machine, i keep the devkits in
    - C:\Tools\RubyDevKit-4.5.2
    - C:\Tools\RubyDevKit-4.7.2-32
    - C:\Tools\RubyDevKit-4.7.2-64
    Maybe that is another model that's more future-proof?

  4. Support Staff 4 Posted by Feodor Fitsner on 16 Jul, 2015 06:12 PM

    Feodor Fitsner's Avatar

    Yeah, maybe having a DevKit in a separate root folder could be a better solution. Right now it's in C:\Ruby21, but registered for all 2.x rubies: "C:/Ruby200", "C:/Ruby21", "C:/Ruby22"

    I'll add a new issue.

  5. 5 Posted by Claudius on 16 Jul, 2015 07:15 PM

    Claudius's Avatar

    What does "registered" mean in this context? i'm pretty new to Appveyor, so please don't be offended if this is an obvious thing i'm missing.

  6. Support Staff 6 Posted by Feodor Fitsner on 16 Jul, 2015 07:19 PM

    Feodor Fitsner's Avatar

    Sure. When you install DevKit you create config.yml file with paths to all Rubies which DevKit should be "applied" to.

    https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#4-ru...

  7. 7 Posted by Claudius on 16 Jul, 2015 07:26 PM

    Claudius's Avatar

    That is odd, I never did it that way? I just ran the devkitvars.bat, which added MinGW and stuff to the path. I'll see if i can get Luis Lavena's attention, he's the Pope of Ruby on Windows. He will know.

  8. Support Staff 8 Posted by Feodor Fitsner on 16 Jul, 2015 07:28 PM

    Feodor Fitsner's Avatar

    Yeah, and let me know about your results. I'm not Ruby guru and follow instructions, so whatever you say guys... :)

  9. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:57 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac