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

View: New views
2 Messages — Rating Filter:   Alert me  

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

by dreamcat four :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

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

by dreamcat four :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 30, 2009 at 4:45 PM, dreamcat four <dreamcat4@...> wrote:
> c) Another question i have is about persistent daemon service /

Indeed rb-daemons doesn't provide the same function as a launchd plist
file. The mongrel_cluster gem does provide an init.d script, which
will read config from /etc/mongrel_cluster on boot. we don't have
init.d on mac, but its a start.

It suggest we should add startupitem... to rb-mongrel_cluster

>
> Best regards,
>
> dreamcat4
> dreamcat4@...
>
_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev