Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330489 - Multiple ruby support for www-apache/passenger
Summary: Multiple ruby support for www-apache/passenger
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
: 398015 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-30 12:12 UTC by Felix Schäfer
Modified: 2013-07-21 08:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Schäfer 2010-07-30 12:12:27 UTC
Gentoo now supports concurrent (major) ruby versions, it would be great if passenger supported those, or at least Ruby Enterprise Edition (as one is more or less developed with the other one in mind).

After a short discussion on #gentoo-ruby, there seem to be 1 or 2 files that will be problematic because they aren't in the "gem path" and hence need to be versioned "by hand". The apache module (passenger.so) could be name passenger-RUBY_VERSION.so, the config (/etc/apache/modules.d/30-mod_passenger.conf) would need to be changed to support that, either through a IfDefines (PASSENGER-RUBY18, PASSENGER-REE18 and so on) or through a "#uncomment the next 2 lines to use REE18 instead of RUBY18" thing.

Reproducible: Always

Steps to Reproduce:
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-30 15:47:15 UTC
I sincerely have little hope for this to work consistently with Apache, for multiple Ruby versions... I'm sincerely tempted to just make it selectable with RUBY_TARGETS which one of the three to build for... it definitely _won't_ work to load two passengers in the same instance, so it wouldn't make much sense to have multiple of them available.

Hans?
Comment 2 Felix Schäfer 2010-07-30 17:12:14 UTC
(In reply to comment #1)
> it definitely _won't_ work
> to load two passengers in the same instance, so it wouldn't make much sense to
> have multiple of them available.

I'm aware of that :-)

> I sincerely have little hope for this to work consistently with Apache, for
> multiple Ruby versions... I'm sincerely tempted to just make it selectable with
> RUBY_TARGETS which one of the three to build for…

Fine by me, as long as I can get it to work with REE with emerge ;-)
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-30 17:20:18 UTC
Yeah my idea for stuff like this (I actually noted it in one of my last two posts, it is "ruby used as interpreted rather than for bindings"), is to provide the usual targets, but only enable it for the first one enabled (the order in USE_RUBY is relevant) and warn if more than one is enabled.

So you could then just do

echo "www-apache/passenger -ruby_targets_ruby18 -ruby_targets_ruby19 ruby_targets_ree18" >> etc/portage/package.use
emerge passenger

and it would work.

Not this weekend as I'm swamped, maybe I'll work on it next week.
Comment 4 Hans de Graaff gentoo-dev Security 2010-07-31 06:24:40 UTC
We already discussed this a bit on IRC before Felix filed the bug. I like the configuration solution better, but whether that works as expected is something we should test. Otherwise the USE flag approach will work in any case, once we make passenger use ruby-ng.
Comment 5 Hans de Graaff gentoo-dev Security 2010-10-24 13:58:22 UTC
It looks like passenger 3.0 has support for multiple ruby implementations using the standalone approach. Let's get that packaged up and see how it works out.
Comment 6 Felix Schäfer 2010-11-05 09:40:30 UTC
I don't like to sound impatient, but any luck/progress/test version of a "ruby-ng"ified passenger ebuild?
Comment 7 Hans de Graaff gentoo-dev Security 2010-11-06 10:10:49 UTC
(In reply to comment #6)
> I don't like to sound impatient, but any luck/progress/test version of a
> "ruby-ng"ified passenger ebuild?

passenger-3.0.0 is using the ruby-ng eclass, but as it is it can't support multiple ruby targets yet. It also has a bunch of open bugs atm. I don't intend to backport ruby-ng support to passenger 2.x.
Comment 8 Felix Schäfer 2010-11-06 13:25:42 UTC
(In reply to comment #7)
> passenger-3.0.0 is using the ruby-ng eclass, but as it is it can't support
> multiple ruby targets yet. It also has a bunch of open bugs atm. 

Passenger or the ebuild? Anyway, that's probably enough for me, I suppose that if I make a local copy of the ebuild and change the ruby_target from ruby18 to ree18 it should mostly work as expected?

> I don't intend
> to backport ruby-ng support to passenger 2.x.

I don't think there's any need to.
Comment 9 Hans de Graaff gentoo-dev Security 2010-11-07 05:21:40 UTC
(In reply to comment #8)

> Passenger or the ebuild? 

The ebuild. Passenger itself seems to run fine on my low-volume test website.

> Anyway, that's probably enough for me, I suppose that
> if I make a local copy of the ebuild and change the ruby_target from ruby18 to
> ree18 it should mostly work as expected?

I hope so, yes.
Comment 10 Alex Legler (RETIRED) archtester gentoo-dev Security 2012-01-08 15:50:42 UTC
*** Bug 398015 has been marked as a duplicate of this bug. ***
Comment 11 Hans de Graaff gentoo-dev Security 2012-04-03 17:17:06 UTC
*passenger-3.0.11-r1 (27 Feb 2012)

  27 Feb 2012; Diego E. Pettenò <flameeyes@gentoo.org>
  +passenger-3.0.11-r1.ebuild:
  Revision bump to try supporting Ruby 1.9 _or_ Ruby 1.8.

This adds the possibility to use either ruby18 or ruby19. I guess we could use the same mechanism to also make ree18 an option.
Comment 12 Hans de Graaff gentoo-dev Security 2013-07-21 08:49:31 UTC
passenger 4.x has support for multiple ruby versions. I've just added 4.0.10 to the tree.