I was wondering if there is any downsides from using rvm in a production server. What should I prefer, rvm or native installation and why?
相关问题
- javah not able to find android classes
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
相关文章
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
- uninitialized constant Mysql2::Client::SECURE_CONN
- ruby - simplify string multiply concatenation
Use RVM. Because it is more simple.
You'll have all distributions in one place, all gems in one place, and you're using the same tool that you use in development. There are no performance issues either.
Don't do it, err, maybe do it
Simplicity is always rewarded.
Rvm is a development tool. Since you will not be switching Ruby versions back and forth dynamically on a production server, it can do no good and could create arbitrary levels of pain and suffering.
Update: Ok, we've got some excellent comments and know more now. For one, rvm was in fact a production tool first. (Who knew?) It looks like if an application doesn't bundle its own gem environment, rvm will do it at the system level, and that could be useful.
So there probably isn't a single answer to this question. If only one application runs on the server, or if all server applications are, say, Rails3, then rvm will not be needed. But other scenarios will benefit from the environment management.
Use RVM, as that way your application has exactly what it needs, and system updates do not interfere or change your requirements. One host I set up had a distro version of 1.8, but I wanted to develop for 1.9.2. Rather than break the distro version, RVM lets me run a custom version. RVM plays well with passenger phusion for rails deployments too.
Compile your own Ruby and MongoDB, PostgreSQL, MySQL, redis, and whatever other supporting tools you rely on. This way get full control over the versions used everywhere and you can apply any necessary security or bug fix upgrades at will without having to wait for your OS vendor to supply system updates and patches. Compiling your own also makes it easier to ensure that your development, staging, and production environments are all using the same versions of everything you need.
If using RVM makes it easier for you to build your own toolchain then use RVM. In any case, using the system supplied tools often leaves you a few versions behind and leaves you hanging when you need to apply critical patches.
system installation:
rvm installation: