Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X 10.10 no longer includes Ruby 1.8 #84

Closed
lilyball opened this issue Jun 4, 2014 · 6 comments
Closed

OS X 10.10 no longer includes Ruby 1.8 #84

lilyball opened this issue Jun 4, 2014 · 6 comments

Comments

@lilyball
Copy link

lilyball commented Jun 4, 2014

Command-T requires Ruby 1.8, but OS X 10.10 no longer includes it, and the vim that ships on the system includes ruby support using ruby 2.0.

/usr/bin/vim provides Ruby version 2.0.0-p451.

@lilyball
Copy link
Author

lilyball commented Jun 4, 2014

Incidentally, the failure mode here is quite horrible. If I try and use Command-T with Ruby 2.0, I get a forkbomb (ruby calling sh calling ruby, ad infinitum)

@wincent
Copy link
Owner

wincent commented Jun 4, 2014

Command-T doesn't require 1.8 (or any specific version of Ruby). It will use whatever Ruby you compile it with (and that's generally based on what you have in your PATH, potentially manipulated by tools such as rvm and rbenv, at build time). The added catch here is that you must compile it with the same version of Ruby that Vim links against, or it won't work.

I gather you're not on a clean install of 10.10, so you should just rebuild Command-T against the system Ruby:

cd path/to/your/command-t/install
cd ruby/command-t
ruby --version # verify you're using 2.0.0-p451
vim -c 'ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"' # should print 2.0.0-p451
ruby extconf.rb
make clean
make

@lilyball
Copy link
Author

lilyball commented Jun 4, 2014

Hrm, the documentation referenced Ruby 1.8 multiple times and I thought that was the required version. But it appears that was a misinterpretation of the docs.

I already tried recompiling command-t itself. I'll try again though.

@wincent
Copy link
Owner

wincent commented Jun 4, 2014

Yeah, the docs say this:

On OS X Snow Leopard, Lion and Mountain Lion, the system comes with Ruby 1.8.7
and all recent versions of MacVim (the 7.2 snapshots and 7.3) are linked
against it.

On OS X Mavericks, the default system ruby is 2.0, but MacVim continues to
link against 1.8.7, which is also present on the system at:

  /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

I'll update the docs with info about Yosemite as well.

@lilyball
Copy link
Author

lilyball commented Jun 4, 2014

You're right, this time it worked without forkbombing. I'm not sure what went wrong last time, but forkbombing is the behavior I was seeing with Homebrew trying to run its Ruby 1.8-compatible code on Ruby 2.0, so that's what I thought was going on here.

I'll leave this open to cover updating the docs I guess.

@wincent
Copy link
Owner

wincent commented Jun 4, 2014

Deal. 👍

wincent added a commit that referenced this issue Jun 4, 2014
@wincent wincent closed this as completed Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants