How do I point RVM to my Homebrew Ruby dir?
I installed Ruby 1.9.2 using homebrew, then installed RVM.
I want to point RVM to the version I have in my Cellar fol开发者_如何转开发der. How can I make rvm --default 1.9.1
point to the one in Cellar without having to reinstall it again using RVM?
You can't do it and get the right behavior.
RVM works within its own directory when running as a single-user's sandbox. Any Ruby it controls will exist in your ~/.rvm
directory.
Anything outside of RVM's control will be considered the system
setting, and it will be up to you to manage whether that is the regular Ruby installed in /usr/bin
or /usr/local/bin
or in /opt
or wherever.
In my opinion, you should let RVM manage the Ruby installations. It is very slick and has rapidly become the favored way to manage Ruby development environments on Linux and Mac OS.
You could try creating aliases from the Cellar folder to the appropriate place in the ~/.rvm
, but RVM modifies some things during its install process, such as gem
, which would not be done in the Homebrew-installed folder, and would cause RVM's gem support to break for that Ruby version.
精彩评论