Mac OS X 10.11: Installing Ruby Gems is Broken
| Originator: | justin | ||
| Number: | rdar://22928867 | Date Originated: | 30-Sep-2015 11:18 PM |
| Status: | Open | Resolved: | |
| Product: | OS X | Product Version: | Mac OS X 10.11 (15A282b) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
The new security-related changes to El Capitan have resulted in Ruby's "gem install" command breaking in horrible ways. There are two main issues:
1. The RubyGems installation directory is now set to "/Library/Ruby/Gems/2.0.0" which is not writable by the user. Thus, "gem install" requires sudo, which is shouldn't.
2. The executables are not installed in a location in the user's $PATH, meaning the user either has to update their path or install manually into a directory that is in their path.
In a nutshell, we've gone from this:
$ gem install jekyll
to this:
$ sudo gem install -n /usr/local/bin jekyll
Steps to Reproduce:
Attempt to install a Ruby gem in 10.11 with a command similar to the following:
gem install jekyll
Expected Results:
The gem is installed.
Actual Results:
The following error is thrown:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Adding sudo allows the gem to install, but it is still not usable because it is installed in a location that is not in the user's $PATH.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!