Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

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

Open
mgm812 opened this issue Oct 19, 2014 · 6 comments

Comments

@mgm812
Copy link

mgm812 commented Oct 19, 2014

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

@Zamyatin
Copy link

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

@elia
Copy link
Collaborator

elia commented Oct 27, 2014

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.

@mgm812
Copy link
Author

mgm812 commented Nov 16, 2014

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?

@elia
Copy link
Collaborator

elia commented Dec 30, 2014

@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…

fiedl added a commit to fiedl/markdown-redcarpet.tmbundle that referenced this issue Feb 25, 2015
@rebelwarrior
Copy link

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.

@michaeldough
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants