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

replace broken link; add other Mac-specific info #3968

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@oresmus
Contributor

oresmus commented Sep 9, 2015

The link for 'use Xcode to install Command Line Tools' seems to be broken. I don't know what it contained, but I have replaced it with a short piece of text which describes how to do the same thing. I have also added a bit more advice which was helpful for me.

FYI, the existing Mac advice on this page includes using sudo. I have been told that using sudo in these commands is not advisable, but since I have no direct knowledge of the pros and cons of that (in this specific case), I am not completely removing that advice, only adding the alternative of not using sudo.

FYI, I am submitting this after the discussion in #3963 but it is not about the same doc bug. It covers most (but maybe not all) of the changes I might suggest to this page. (I would also like advice on where to put new info specific to Mac/ruby newbies, about installing ruby before trying the "quickstart".)

replace broken link; add other Mac-specific info
The link for 'use Xcode to install Command Line Tools' seems to be broken. I don't know what it contained, but I have replaced it with a short piece of text which describes how to do the same thing. I have also added a bit more advice which was helpful for me.

FYI, the existing Mac advice on this page includes using sudo. I have been told that using sudo in these commands is not advisable, but since I have no direct knowledge of the pros and cons of that (in this specific case), I am not completely removing that advice, only adding the alternative of not using sudo.
{% highlight bash %}
sudo gem install jekyll
{% endhighlight %}
Note that upgrading MacOS X does not automatically upgrade Xcode itself (that can be done separately via the App Store), and having an out-of-date Xcode.app can interfere with the command line tools downloaded above. One way to mitigate this without installing a newer Xcode is to simply rename `/Applications/Xcode.app`. (The effect of this can be checked in the output of `xcode-select -p`.)

This comment has been minimized.

@parkr

parkr Sep 9, 2015

Member

What does renaming accomplish?

@parkr

parkr Sep 9, 2015

Member

What does renaming accomplish?

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Sep 9, 2015

Member

Thanks!

Member

parkr commented Sep 9, 2015

Thanks!

@oresmus

This comment has been minimized.

Show comment
Hide comment
@oresmus

oresmus Sep 9, 2015

Contributor

@parkr , based on my experience/inference, renaming /Applications/Xcode.app prevents shell commands like gcc from using the binaries inside that version of Xcode.app, causing them instead to use other binaries (I am not sure if those are the same binaries which xcode-select --install downloads -- they might be, or they might have come from my recent upgrade of OS X from 10.7.5 to 10.10.5).

My evidence for this is that before I renamed it, xcode-select -p reported a path inside /Applications/Xcode.app and gem install jekyll had compilation errors (of the sort that using an old Xcode might explain, and in the very first gem of many), but after doing it, xcode-select -p reported a path not inside any Xcode.app, and gem install jekyll compiled many gems and completed without errors.

Contributor

oresmus commented Sep 9, 2015

@parkr , based on my experience/inference, renaming /Applications/Xcode.app prevents shell commands like gcc from using the binaries inside that version of Xcode.app, causing them instead to use other binaries (I am not sure if those are the same binaries which xcode-select --install downloads -- they might be, or they might have come from my recent upgrade of OS X from 10.7.5 to 10.10.5).

My evidence for this is that before I renamed it, xcode-select -p reported a path inside /Applications/Xcode.app and gem install jekyll had compilation errors (of the sort that using an old Xcode might explain, and in the very first gem of many), but after doing it, xcode-select -p reported a path not inside any Xcode.app, and gem install jekyll compiled many gems and completed without errors.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Sep 9, 2015

Member

Ok. I don't think renaming is a great way to mitigate issues with an out-of-date Xcode. The best way is to update Xcode or to use gcc from Homebrew or something.

Member

parkr commented Sep 9, 2015

Ok. I don't think renaming is a great way to mitigate issues with an out-of-date Xcode. The best way is to update Xcode or to use gcc from Homebrew or something.

@oresmus

This comment has been minimized.

Show comment
Hide comment
@oresmus

oresmus Sep 9, 2015

Contributor

Renaming is equivalent to deinstalling (but more easily reversible), and the old version was causing problems, so it might not be the best way, but it is sometimes useful.

Anyway, feel free to accept this PR and further edit it; or if you would prefer me to modify the PR, I could either remove the last sentence about renaming (but leave the useful info before it), or I could modify the last sentence to not actually recommend renaming, but still carry the useful info (which I did not know before and was important for me to find out) about how the command-line tools work differently depending on what is present at the file path /Applications/Xcode.app.

Or I could pull all this into a separate page about "Mac gotchas" if you want to suggest where one should live.

Contributor

oresmus commented Sep 9, 2015

Renaming is equivalent to deinstalling (but more easily reversible), and the old version was causing problems, so it might not be the best way, but it is sometimes useful.

Anyway, feel free to accept this PR and further edit it; or if you would prefer me to modify the PR, I could either remove the last sentence about renaming (but leave the useful info before it), or I could modify the last sentence to not actually recommend renaming, but still carry the useful info (which I did not know before and was important for me to find out) about how the command-line tools work differently depending on what is present at the file path /Applications/Xcode.app.

Or I could pull all this into a separate page about "Mac gotchas" if you want to suggest where one should live.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Sep 10, 2015

Contributor

Personally I think this is better suited in the gotcha's with a strong warning that it should be an absolute last attempt because as a systems guy I would be highly annoyed if I seen a system that did some hacky broken stuff like this when there are other more viable solutions.

Contributor

envygeeks commented Sep 10, 2015

Personally I think this is better suited in the gotcha's with a strong warning that it should be an absolute last attempt because as a systems guy I would be highly annoyed if I seen a system that did some hacky broken stuff like this when there are other more viable solutions.

@parkr parkr closed this in 4026434 Sep 21, 2015

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Sep 21, 2015

Member

Thanks!

Member

parkr commented Sep 21, 2015

Thanks!

parkr added a commit that referenced this pull request Sep 21, 2015

@oresmus oresmus deleted the oresmus:patch-1 branch Sep 21, 2015

@oresmus

This comment has been minimized.

Show comment
Hide comment
@oresmus

oresmus Sep 21, 2015

Contributor

@parkr, You're welcome -- good solution.

(I don't have time to write a "mac gotchas page" for now, but your revised commit already contains the main things such a page would have needed to say, so maybe a new page is not needed. The only other info I could add, that might be useful and that I know enough to say correctly, is "Mac OS 10.7.5 is probably too old to be worth trying this on", and "no need for rvm or rbenv, just use brew to upgrade to latest ruby (and use the advice here about Xcode and command line tools), then install jekyll as documented". Some things I don't know, and wish I did, are exactly what difference sudo makes in the documented commands that suggest using it -- does it only make some writes succeed rather than fail, or does it change in which directories those writes are attempted?)

Contributor

oresmus commented Sep 21, 2015

@parkr, You're welcome -- good solution.

(I don't have time to write a "mac gotchas page" for now, but your revised commit already contains the main things such a page would have needed to say, so maybe a new page is not needed. The only other info I could add, that might be useful and that I know enough to say correctly, is "Mac OS 10.7.5 is probably too old to be worth trying this on", and "no need for rvm or rbenv, just use brew to upgrade to latest ruby (and use the advice here about Xcode and command line tools), then install jekyll as documented". Some things I don't know, and wish I did, are exactly what difference sudo makes in the documented commands that suggest using it -- does it only make some writes succeed rather than fail, or does it change in which directories those writes are attempted?)

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.