Last modified: 2014-06-27 19:23:18 UTC
This was added in 5388b38c54aecea4bc6b90ac1e0a9dc1d7bc38f2 . I assume ruby-build is used so an exact version of Ruby can be specified. However, it would be great to download a binary Ruby (http://jonathan-jackson.net/rvm-and-rbenv indicates this can be done with rbenv), so the compilation doesn't have to slow down provisioning.
As far as I can tell, ruby-build doesn't yet support the installation of binary packages (https://github.com/sstephenson/ruby-build/issues/42). There is a rbenv plugin that accomplishes this using the RVM binary repos (https://github.com/garnieretienne/rvm-download) but it isn't well tested. Nonetheless, I'll look into how we might make use of it. The compilation of Ruby should only happen once, as it's system wide. Is it happening across multiple provisions for you, or are you provisioning new VMs frequently? There might be some ways to at least speed up the compilation. Disabling of rdoc comes to mind.
(In reply to Dan Duvall from comment #1) > The compilation of Ruby should only happen once, as it's system wide. I thought part of the point was to allow different roles to specify their own versions of Ruby. > Is it happening across multiple provisions for you, or are you provisioning new > VMs frequently? No, I'm mainly wanting to make it quick for new developers (same reason for the work at bug 49057, etc.).
(In reply to Matthew Flaschen from comment #2) > (In reply to Dan Duvall from comment #1) > > The compilation of Ruby should only happen once, as it's system wide. > > I thought part of the point was to allow different roles to specify their > own versions of Ruby. The main point was isolation of gems for each suite of browser tests to avoid gem dependency issues, especially those caused by commonly outdated packaged versions of bundler. However, having a more up-to-date version of Ruby is definitely an added benefit as it speeds up execution of browser tests and will allow the QA team to stay current with upcoming cucumber and rspec releases. > > Is it happening across multiple provisions for you, or are you provisioning new > > VMs frequently? > > No, I'm mainly wanting to make it quick for new developers (same reason for > the work at bug 49057, etc.). That's completely reasonable and I agree that the current build time is too long. I'll see if I can get the rvm-download plugin working reliably and, if not, see about hosting a precompiled build ourselves or, worst case, switch to RVM—I haven't had great success with it in automated environments, but maybe things have improved on that front.
Change 140877 had a related patch set uploaded by Dduvall: Reimplemented ruby module to use distro packages https://gerrit.wikimedia.org/r/140877
Change 140877 merged by jenkins-bot: Reimplemented ruby module to use distro packages https://gerrit.wikimedia.org/r/140877
Looks to be fixed, if I understand that patch correctly. Thanks.