首先,对于我的任何愚蠢错误,我深表歉意。我刚开始使用 OneMonthRails,这对我来说都是全新的。我的问题是 Homebrew 和 git。我被告知我的问题与环境变量有关,而且我已经做了足够多的研究来确信这是正确的。好的,这是详细信息:
我尝试安装 Homebrew,但遇到了 Xcode 不存在的障碍。正在运行 OSX 10.6.8,并且必须至少升级到 10.7.x 才能安装最新的 Xcode。我升级到 OSX 10.8.4 并安装了 Xcode 并重新运行以下行
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
我得到以下脚本:
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
我正在安装 Homebrew,以便我可以安装 ImageMagick 以运行 Paperclip gem,所以我听取了终端关于运行 $ brew doctor 的建议。
$ brew doctor
生产线
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.
Warning: Broken symlinks were found. Remove them with `brew prune`:
///损坏的符号链接的长列表///
Warning: An outdated version of Git was detected in your PATH.
Git 1.7.10 or newer is required to perform checkouts over HTTPS from GitHub.
Please upgrade: brew upgrade git
我想知道我的 git 版本是什么,所以我运行以下脚本:
$ git --version
并产生以下行:
git version 1.7.9.6
我确定了我的 git 所在的位置:
$ which git
这带来了:
/opt/sm/pkg/active/bin/git
经过更多研究,我发现我可以使用以下脚本升级我的 git:
$ brew install git
结果脚本的最后一行是警告:
Warning: This keg was marked linked already, continuing anyway
==> Summary
/usr/local/Cellar/git/1.8.3.2: 1325 files, 28M, built in 45 seconds
我验证了我的 git 升级
$ git --version
git version 1.7.9.6
sudo think...也许我需要运行升级而不是安装。
///重启电脑///
$ brew upgrade git
Error: git-1.8.3.2 already installed
嗯……再试试看医生
$ brew doctor
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
$ git --version
git version 1.8.3.2
耶!我做对了!现在完成 Homebrew,我可以继续安装 ImageMagick:
$ brew doctor
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools" package provided by Apple.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Arrg... 我刚刚安装了 Xcode。如何安装命令行工具?这个配置警告是什么?我在 StackOverflow 上检查它,它把我带到这里:(.../questions/15225312/brew-doctor-gives-out-warnings)
我不完全知道自己在做什么,所以以下内容有点愚蠢
$ $PATH
不
$ echo $PATH
没有什么...
$ export PATH=/sm/pkg/active/bin/
没有什么
$ export PATH= /sm/pkg/active/bin/
-bash: export: `/sm/pkg/active/bin/': not a valid identifier
(注意 = 后面的空格)
我意识到我有多不知道自己在做什么,所以我寻求帮助
$ brew help
-bash: brew: No such file or directory
哦哦...
$ brew doctor
-bash: brew: No such file or directory
我想我弄坏了我的电脑,伙计们。我应该怎么办???我需要让 Homebrew 正常工作,以便我可以安装 ImageMagick 图像处理器并在 Rails 中使用 Paperclip gem。
:((