Tip: building 5.0 apps with Ruby 2.x = fast!

J Jon Tara 2 years 11 months ago
5 1 0

Rhodes 5.0 seems to build under Ruby 2.x (I used 2.1.2) as long as you add the iconv Gem. (Removed from standard Ruby library, but can replace with a Gem.)

I've seen previous posts on this, and may be possible with 4.x, but unsure how well tested the build process has been with Ruby 2.x.

Is building with Ruby 2.x now officially supported?

One advantage of this is that Ruby, Rake (supplied with Ruby now) or both, are blindingly faster, making incremental builds much faster. It won't help that much with a full build, because updating Ruby won't make the compiler run faster.

A minimum build of our product with no file changes takes 88 seconds on my Mac Mini when building with Ruby 1.9.3.

The same takes 7 seconds with Ruby 2.1.2.

I did this test with the same app and Rhodes 5.0.2. The only variable was the Ruby version that the Gemset was installed into. (And of course adding the iconv gem with Ruby 2.1.2).

I would expect it will shave about 80 seconds off of our full build, which is still a good improvement.

Please register or login to post a reply

1 Replies

M Michael Toews

Jon,
     Thanks for the notice on this! I'm not sure that Ruby 2.x is officially supported but I am very happy to hear that it is working out well for you . If I find that ruby 2.X is officially supported and reliably faster for incremental builds, We'll make a blog post about it and announce it here on launchpad.

CONTACT
Can’t find what you’re looking for?