Can I use RVM to maintain a single version of Ruby for all users?

廉价感情. 提交于 2019-12-05 09:13:52

Install RVM as root and do a sudo rvm use 1.9.2 --default. Any user sourcing /usr/local/rvm/scripts/rvm will per default have 1.9.2.

I know this doesn't quite answer your question, but:

I ran into several problems with installing RVM globally and resorted to using one user account for deployment and for all Ruby / Rails processes -- that users account exists on all dev and production servers, and the .rvm directory is rsync'ed from one dev-server to all other servers.

How many different users on your App servers do really need to access Ruby 1.9.2? Can't you just trim that down to just one user? That worked best for me.

Note:

One thing you probably want to avoid is to install RVM on your app server(s) manually and then install Ruby and Gems on the app server ... you don't want to keep tools like cc lying around on your production servers for security reasons! rsync'ing the .rvm directory is far safer! and the result is far more consistent!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!