Ruby app with non-system Ruby

megatux at gmail.com megatux at gmail.com
Tue Jan 29 19:07:55 UTC 2019


I see. That should work, thanks.
Now, doesn't this compile-time list of available runtimes limit the
"dynamic" nature of the service?
e.g. I'm thinking in the common scenario of upgrading one of the runtimes
because of a security update.
This involves starting a new process and move all of its apps & listeners,
right?

El mar., 29 de ene. de 2019 a la(s) 13:04, Valentin V. Bartenev (
vbart at nginx.com) escribió:

> On Tuesday 29 January 2019 12:30:24 megatux at gmail.com wrote:
> > Hi,
> >   I'm having trouble setting a new Ruby app. I'm unable to use a Ruby
> > different than the system one.
> >
> > My idea is to have several rack web apps on different ports (or URIs if
> > possible) but using a Ruby installation from a version manager, like
> rbenv,
> > RVM, asdf.
> >
> > I have both Unit .deb installation and Docker installation.
> >
> > So, to make it simple, let's say I want 2 web apps, a Rails app and a
> > Sinatra app, each one using a different Ruby installation within the
> "asdf"
> > language version manager (it could be same user or not).  Is it possible?
> > Then, if the two apps are APIs, can I migrate _progressively_ different
> > endpoints?
> >
> > Thanks a lot.
> >
>
> Because of perfomance reasons Unit doesn't use command-line interptreter
> directly from a version manager (that would be unallowable slow).
>
> In order to use Ruby from a version manager, you have to compile a Unit
> module with this particular Ruby interpreter.
>
> See here for details on compiling your own Ruby module from sources:
> http://unit.nginx.org/installation/#configuring-ruby
>
> Having modules of each version you will be able to switch between them
> via control API socket on a per application basis.
>
> See here for the "type" option details:
> http://unit.nginx.org/configuration/#application-objects
>
>   wbr, Valentin V. Bartenev
>
> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit
>


-- 
-----------------------------------------------------
   .^. In an open world, who needs windows or gates?
   /V\   Cristian Molina <http://www.megatux.me/>
  //  \\   GNU/Linux User #73047, Ubuntu User # 14733
 /( _ )\       Merlo, San Luis - Argentina
  ^^ ^^ ---------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20190129/20f95531/attachment.html>


More information about the unit mailing list