emboss/krypt-core — comment on commit 8bb5101a2d3dea5ed964c5bc906c32408e4f043f
File: Rakefile line 22
By luislavena:

> Is this outdated because RubyInstaller uses x86-mingw32?

Actually no, the platform (or the platforms) you specify with `cross_platform` are used by RubyGems to generate packages with the platform you indicated.

For example, sqlite3:

https://github.com/luislavena/sqlite3-ruby/blob/master/tasks/native.rake#L29

It specifies `i386-mswin32-60` and `i386-mingw32`. The first is the one used by Visual Studio builds of Ruby (garbagecollect.jp) the second is RubyInstaller.

Specifying both will trigger the build and package process for the two. RubyGems changes `i386` into `x86`, that is why I said is not mandatory one form or the other.

> Or can I target multiple platforms at once (64 bit, too). I followed the description in rake-compiler's README:

At this time there is no 64bits build of Ruby (at least not from RubyInstaller) and rake-compiler is not prepared to deal with that case.

> How would I proceed if I wanted to try the gem out e.g. under Windows 7? (steps)

Your steps are correct, installing RubyInstaller and copy over the gem file and installing with `gem install --local gemfile.gem` will get the gem installed, no need for DevKit.

> I understood that in the general case (not relying on DevKit) I would have to provide a 'fat gem', no?

Correct, you would have to install (using `rake-compiler`) at least two versions of Ruby that target Windows: one 1.8 and one 1.9. I personally recommend latest 1.8.7 and 1.9.3

Then, you will need to set `RUBY_CC_VERSION=1.8.7:1.9.3` (either by export or when invoking rake)

For example, some developers set `RUBY_CC_VERSION` inside the code instead:

https://github.com/ffi/ffi/blob/master/Rakefile#L8

There are some examples in rake-compiler's wiki page:

https://github.com/luislavena/rake-compiler/wiki/Projects-using-rake-compiler

Hope that helps.