1

I'm wondering what would be the best approach to hosting multiple Rails applications where each application has a different gemset and may possibly use a different version of Ruby. I'm thinking of running RVM to manage the different gemsets for each application, and having each application run on their own passenger standalone instance.

My only concern around this approach is the memory footprint of having multiple passenger-standalone servers running vs. just having one serve them all. In any case, I'm pretty new to this stuff, so I'm open to suggestions on what would be the best practice for this kind of setup.

I also read this blog post and I was wondering what people think of it. It sounds like a reasonable setup and speaks to my OCD about keeping things clean and separate between applications.

John
  • 526
  • 1
  • 5
  • 13

2 Answers2

1

It's quite easy, since Passenger 3.2 will support different ruby versions out-of-the box. Only thing is, 3.2 has not been released yet. Just make sure you set the proper passenger_ruby and RVM/Capistrano can do the rest.

Read more in this article: http://ariejan.net/2012/05/11/running-a-different-ruby-with-passenger-3-2-and-rvm

Note that I do run 3.2 on http://ariejan.net :-)

Ariejan
  • 111
  • 2
  • Could you add on which **user account** and under which **rvm path** (sudo, www-data, ..) you set up the experimental passenger version? Would you follow these [multi user installation guide for rvm](http://kris.me.uk/2011/10/28/rails-rvm-passenger-capistrano-git-apache.html)? – JJD Jun 08 '12 at 14:04
0

I'm author of the mentioned article.

Using separate instances of passenger standalone or unicorn is good idea, they have low memory overhead and will allow good separation.

In best case you would run each application as separate user which will prevent accessing other applications data.

If i remember correctly one instance of nginx (it's used for passenger standalone) uses about 3MB of ram - it's very low in my opinion.

There is new option - passenger 3.2, it's in beta but it should allow running different rubies from one server.

mpapis
  • 334
  • 3
  • 9