RVM | Running user scripts

后端 未结 3 1709
南笙
南笙 2021-01-21 01:50

Is it possible while using the Ruby version manager to run scripts not from the console but using other ways — at system startup or by a keyboard shortcut for example?

3条回答
  •  臣服心动
    2021-01-21 02:32

    RVM installs a command rvm-shell. You can use rvm-shell, pass it whatever you would pass rvm use, then you can execute a shell command.

    rvm-shell will set your environment for that shell script, or you can use rvm-shell on one line, and have it execute the parameter as a shell command.

    For example:

    rvm-shell rbx-2.0 -c 'which ruby'
    

    Which should equal your rbx ruby.

提交回复
热议问题