Reputation: 1701
I am running my rails 3 project under ruby 1.9.2 with rvm. I use vim through zsh which was compiled using ruby 1.8 (the system ruby that comes with mac osx).
What's the best way to get these two ruby versions to match up?
Option 1: I can have rvm use ruby 1.8 but I don't want to be "stuck" on 1.8. Plus my 'bundle exec rails' commands don't seem to work with this option.
Option 2: Compile vim with ruby 1.9.2. But will this work ok?
I know using macvim compiled with 1.9.2 is an option but I really prefer the terminal vim.
Upvotes: 1
Views: 492
Reputation: 1
Rather than recompile vim, the easier solution is to change the /usr/bin/ruby symlink to point to your desired version of ruby. I use RVM / mac OSX leopard, and this worked for me.
Upvotes: 0
Reputation: 14907
You would try one of these:
You can use MacVim in Terminal. Just alias vim='mvim -v'
if you already have mvim
in your $PATH
. I use this method personally, and I think it's the easiest way.
Compile vim
yourself, with --with-ruby-command=[PATH TO YOUR RUBY 1.9.2]
configuration option. I have not tried it on Mac OS; However in Ubuntu Linux I did --with-ruby-command=/usr/bin/ruby1.9.2
and it worked.
FYI: In Ubuntu they keep every program with version number separated and use update-alternatives
to switch the default. The /usr/bin/ruby
is just a symlink to the default one.
Upvotes: 1