简体   繁体   中英

rvm - can I make a version of ruby installed via rvm the system default (I thought it would be)?

I always have a hard time with rvm so sorry if this has been answered - I have to work with rvm infrequently so some of the ideas don't fully set in.

On my server (a fresh droplet at Digital Ocean) i installed rvm as the deploy user, via:

$\curl -L https://get.rvm.io | bash -s stable
$ source /home/deploy/.rvm/scripts/rvm
$rvm install 1.9.3-p392
$rvm use 1.9.3 --default

If I login as root, I can't see this ruby. Can I make this the system ruby or did I make a mistake? For example, I tried installing the nginx component of passenger via:

root$ passenger-install-nginx-module

but get

root$ passenger-install-nginx-module: command not found

and

root$ which ruby # nothing

Am I supposed to just add the add the path of /home/deploy/.rvm/rubies/ruby-1.9.3-p392/bin/ as an environment variable (I doubt that)? Or have I totally messed this up (which is ok since we don't have anything on droplet)? Is this the recommended way to manage rubies?

thx in advance

you must load your environtment into folder before. Run this command in terminal:


       $ rvm use 1.9.3

Then "ruby -v" must work.

在此页面上查找多用户安装指南: https : //rvm.io/rvm/install/ (使用sudo安装)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM