markdown-redcarpet.tmbundle icon indicating copy to clipboard operation
markdown-redcarpet.tmbundle copied to clipboard

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem: command not found

Open mgm812 opened this issue 11 years ago • 6 comments

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem: command not found in Yosemite

mgm812 avatar Oct 19 '14 15:10 mgm812

Yes, Yosemite standard Ruby is Ruby 2.0. This will require an update.

You could try /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/gem

Zamyatin avatar Oct 27 '14 20:10 Zamyatin

Actually TM provides a ruby18 shim that is able to download a version of Ruby 1.8 if it's missing (as in yosemite) but it's a bit harder to use it to install gems, I'm still not sure about the best solution.

The other option is to switch to the new system default which is Ruby 2.0.

elia avatar Oct 27 '14 21:10 elia

finally, I have a unwise solution.

sudo mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin

sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/gem /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem

sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

I create two soft link, then have a warning in markdown preview:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior

Will it affect use?

mgm812 avatar Nov 16 '14 04:11 mgm812

@mmy812 you can find a copy of ruby 18 here:

~/Library/Application\ Support/TextMate/Ruby/1.8.7/bin/ruby

@sorbits please correct me if there's a better way…

elia avatar Dec 30 '14 12:12 elia

Note that if you're using RVM you might have trouble with env ruby you might try using: #!/usr/bin/ruby if you are on Yosemite, that worked for me.

rebelwarrior avatar Mar 06 '15 12:03 rebelwarrior

This works for me on OSX Yosemite v10.10

Installed gems:

sudo /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/gem install redcarpet:2.3.0 pygments.rb

Edit support file redcarpet.rb by replacing line 1 with:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby

michaeldough avatar Jun 12 '15 06:06 michaeldough