Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Currently our production server runs in system ruby. Passenger handles our rails apps.

Should I move to handling my entire ruby stuff using rvm? What advantage can rvm give me in a production environment? Please advise. I'm a beginner in handling servers. I would need to run one or more apps in the same big server box using passenger.

if I use passenger via rvm, should I install passenger gem for every ruby I install?

share|improve this question

2 Answers 2

If you don't absolutely need to have multiple ruby versions running at the same time I don't see any reason to use rvm. A gemfile and bundle should be good enough to keep the right gems associated with the right application

If you just want to have another version of ruby installed than the system provided, you can compile your self from source or use something like ruby-build.

Rvm does a lot of magic with user PATHs and changes behaviour in the interactive login shell that does not make sense to do on an production server. If you really want two or more versions of ruby (maybe jruby for the application and mri for scripting), rbenv or just setting your PATH right is a better idea.

share|improve this answer
    
Many of us do need to have multiple ruby versions. Consider the case where all our systems run puppet agents with the system ruby (1.8.7), but the web app needs Ruby 1.9.3 and Rails 3.2, and a second web app which is still stuck on Rails 2.3... –  Michael Hampton Nov 13 '13 at 17:32
    
Yes, and then I think something more simple like rbenv, or just setting your PATH for each app is better. RVM can be used on servers, but it's mostly written to be used in an login shell and aid you with different development environments, so I don't see the reason to use it instead of some simpler alternative. –  Mattias Nov 13 '13 at 17:39

rvm will allow you to use latest patch level of your ruby, this includes security patches - which is the main reason for switch

as for running multiple apps on one server the best solution is to use one instance of nginx as a proxy forwarding to unicorn or passenger standalone per app.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.