/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem: command not found
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem: command not found in Yosemite
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
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.
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?
@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…
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.
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