-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
gem install jekyll failed on Mac OS X 10.11 #3984
Comments
I prefer...
Then... i.e....
And or add Installing this way installs for and within the user account [only], instead of system-wide. |
This is not a Jekyll bug, please ask your question at https://talk.jekyllrb.com as this medium is for bugs. |
@jaybe-jekyll Brilliant, thanks. Successfully installed jekyll-3.0.0.pre.beta8 FYI, I think Apple has locked down the system directories in OS X 10.11, so the easy-install instructions on http://jekyllrb.com may need to change. Even using sudo won't work. |
@envygeeks Is there a process for reporting documentation bugs? |
What do you think is a bug @chmaynard? |
The easy-install instructions for jekyll don't seem to work in OS X 10.11 (El Capitan). Apple plans to release this new version of OS X in a few weeks, so you folks might want to investigate. |
If you are using RVM or Rbenv to do the install ( -- they installed ruby and rubygems -- ) via non-root userland you'll need to file a bug with them, if you are using system Ruby, it never worked the way you expected it to because you need to |
We also hint at t he need to sudo in the troubleshooting: http://jekyllrb.com/docs/troubleshooting/#installation-problems it could use a reworking though and if I recall somebody submitted or is going to submit the changes. |
@envygeeks I know almost nothing about Ruby, so please excuse my ignorance. It sounds like I must have used "sudo gem install" at some point in the past. I'm now wondering what will happen when the average user tries to install jekyll on a clean copy of OS X 10.11. Maybe I'll try that myself. |
If the install instructions do not work on Mac, it should not be stated that this project supports Mac OS X. |
Your comments help us none @fulldecent provide more information or refrain from commenting. |
My sarcasm is used to illustrate that this issue should remain open. This approach worked for me with OS X 10.11 15A282b. However, the other Mac advice at http://jekyllrb.com/docs/troubleshooting/#installation-problems did not work.
This is contrast to Yosemite where I needed to use sudo:
Since I no longer have a "stock" system, it would be helpful if someone else who just installed could validate this approach. |
@fulldecent Thanks for your advice. I hadn't thought about using Homebrew to install Ruby. That makes perfect sense because Homebrew will install Ruby into |
SummaryThe installation problem occurs because OS X ships with a copy of Ruby in @fulldecent found a good work-around for 10.11:
A drawback with this work-around is that the user needs to install Homebrew and Ruby before installing jekyll. The user may also need to update their $PATH variable to give |
It would be helpful to re-open this issue to give it more visibility. |
I just tried the work-around described above and it worked flawlessly. |
@chmaynard Thanks for your help. Is your system a stock upgrade or install? And have you installed Xcode command line tools before doing this? I just want to track all the factors here. |
@fulldecent I previously installed both Xcode and Homebrew. We probably need to refine your install procedure for people who are not developers. See below. |
Proposed Checklist for Mac OS X 10.11 El Capitan
Note: Homebrew is designed to work without using sudo. |
Please add the "Documentation" label to this issue. |
@envygeeks, I'm almost certain I have a branch where I was working on this at some point, will take another look... @chmaynard, In the past, I can recall discussions with the Core team regarding how the installation of Ruby should be handled. While installing in the manner you suggest does solve the problem of putting Jekyll's Ruby in an isolated environment, I have had fewer gem conflicts when using a version that is slightly older than what Homebrew will give you. To facilitate that, might I suggest pointing to any of the various Ruby managers out there and people can choose which one suits their needs. Not as an outright requirement, but perhaps an "Information" block here. This probably will go away as 3.0 makes many things "opt-in", but it's still something to consider. Lastly, to provide a definitive answer regarding SIP and available directories, the following information is directly from Session 706. The only change since then is (I think) |
@chrisfinazzo Thanks for the info about SIP. I wasn't sure about I still think that Homebrew is a good option for two reasons: sudo isn't required, and it doesn't disturb Apple's native Ruby software in I believe Homebrew can install previous versions of Ruby. What version would be best for Jekyll? |
These are package managers for Ruby? |
@chmaynard RVM, rbenv, chruby, etc. |
Have a few moments and want to reiterate, and re-share-- in a summary format, that installing
$ jekyll --version
jekyll 3.0.0.pre.beta9
$ ruby --version
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
$ which ruby
/usr/bin/ruby If System-wide meddling with a tinker-hostile environment is not your interest, and or you don't want/need custom/specific Ruby environment(s) ( |
@chmaynard, My rule of thumb has been to follow the base version in @jaybe-jekyll Are you sure? I would be concerned that when 10.11.1 comes out (which might be sooner rather than later), the Installer either does The message from Apple seems to be pretty clear: If you have things that you compile yourself, put them in |
@chrisfinazzo I am sure. My agreement with Apple does not permit me to openly discuss details of beta or GM releases. However, I can state the information and experience I provided was performed within such an environment. Regarding "the installer" performing This approach, summarized, can be described as:
The point from Apple describes, precisely, my earlier reference to...
I believe Apple is referring to meddling within System affairs. Performing operations in ones ~ ($HOME) is sanitary and expected. |
Most people's home directories look like a garbage dump. |
See #3999. |
@debbarmaonit The short answer to your question is that you can't set If however, you are familiar with either rbenv or RVM, you can instead create an isolated environment that doesn't conflict with the system's version of Ruby and then install with just |
I ended up using |
I'm using Mac El Capitan version 10.11.5 and sudo gem install jekyll worked just fine. |
I'm also running into this issue on current macOS Mojave. $ sudo gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181125-42813-1vdjstq.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target `/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `ruby_http_parser.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/http_parser.rb-0.6.0/gem_make.out I've recently installed |
Hi I got the same error as you did, likely because of macOS's system integrity protection.
|
On Mojave, you can also desactivate temporarly SIP MAC protection, by restarting in recovery mode and use terminal with to re-eanble it csrutil enable; reboot |
This worked for me (on Mojave):
I am working on a PR to update those docs. |
what worked for me was: Run the package macOS_SDK_headers_for_macOS_10.14.pkg |
|
Solution for me was ffi/ffi#611 (comment) $ brew install automake autoconf libtool |
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Mac OS X 10.11 (15A282a)
Xcode 7.0 (7A220)
The text was updated successfully, but these errors were encountered: