(ruby) For an http-server which is also a ruby-gem ?

dreamcat four dreamcat4 at gmail.com
Fri Oct 30 09:45:25 PDT 2009


Hello,

For completion of this ticket: http://trac.macports.org/ticket/19342

It seems necessary to create a new "rb-passenger" gem to support
compiling the +passenger variant ( which is an nginx C module provided
by the gem). As such, this would be quite handy for many Ruby / Rails
developers. But then realized that i didn't know enough to create a
proper rubygem macport.

a) Looking at other portfiles, I see a line like this:

ruby.setup			passenger 2.2.5 gem {} rubyforge_gem

But man ruby gems as moving away from rubyforge to gemcutter
repository "http://gemcutter.org". So is the existing macro
rubyforge_gem sufficient for this? Can anyone affirm / deny this
point? On a rubygems installation, the end user would usually add
http://gemcutter.org to the top of the gem-sources list in ~/.gemrc.

b) Is it necessary to make ports of a gem's gem dependencies
explicitly as seperate portfiles? Ie, if this gem depends on 5 others,
do i need to write those 5 other portfiles too?

c) Another question i have is about persistent daemon service /
launchd plist creation for the rubygem HTTP servers unicorn and
rainbows. Effectively they superseed rb-mongrel. Such daemon service
is not necessary for Passenger (above), but it does apply to all these
mongrel like replacements. For example the existing rb-mongrel
Portfile depends on rb-daemons. However there is no mention for any
launchd plist for the mongrel portfile. This confuses me. In nginx
port there is:

startupitem.create      yes
startupitem.executable  ${prefix}/sbin/nginx
startupitem.pidfile     auto ${nginx_pidfile}

Which sorts out an appropriate launchd service. Is similar
configuration forbidden for 'HTTP server' ruby gems such as
rb-mongrel? Theres few evidence in the mongrel portfile that the
alternative daemons service is any good compared to launchd.

Any help would be much appreciated.


Best regards,

dreamcat4
dreamcat4 at gmail.com


More information about the macports-dev mailing list