尝试按照此处的说明进行操作 - https://gorails.com/setup/osx/10.11-el-capitan - 安装Ruby on Rails,但我收到以下错误:
➜ ~ rbenv install 2.2.3
Downloading ruby-2.2.3.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
Installing ruby-2.2.3...
BUILD FAILED (OS X 10.11.2 using ruby-build 20150928)
Inspect or clean up the working tree at /var/folders/l3/skxhsvw51wz7fnn2v1v4d3sh0000gn/T/ruby-build.20151222232425.95349
Results logged to /var/folders/l3/skxhsvw51wz7fnn2v1v4d3sh0000gn/T/ruby-build.20151222232425.95349.log
Last 10 log lines:
checking for nroff... /usr/bin/nroff
.ext/include/x86_64-darwin15/ruby/config.h updated
ruby library version = 2.2.0
configure: creating ./config.status
config.status: creating GNUmakefile
awk: syntax error at source line 1 source file ./confyJCFwP/subs.awk
context is
>>> BEGIN <<< {
awk: bailing out at source line 275
config.status: error: could not create GNUmakefile
然后检查日志文件,最后说的是同样的事情:
...
.ext/include/x86_64-darwin15/ruby/config.h updated
ruby library version = 2.2.0
configure: creating ./config.status
config.status: creating GNUmakefile
awk: syntax error at source line 1 source file ./confyJCFwP/subs.awk
context is
>>> BEGIN <<< {
awk: bailing out at source line 275
config.status: error: could not create GNUmakefile
我该如何解决这个问题?我最近在所有内容上运行brew upgrade
,它似乎成功完成。
注意:我不知道它是否相关,但我的shell是ZSH(通过oh-my-zsh)。
答案 0 :(得分:0)
我最终通过〜/ .zshrc中的PATH设置并将整个路径分成了各个行(有很多)。我认为如果我认为这可能很重要,我可以单独评论每个PATH设置。事实证明,我是对的。我评论了以下内容:
# export PATH="/usr/local/rvm/gems/ruby-2.1.0/bin:$PATH"
# export PATH="/usr/local/rvm/gems/ruby-2.1.0@global/bin:$PATH"
# export PATH="/usr/local/rvm/rubies/ruby-2.1.0/bin:$PATH"
# export PATH="/usr/local/rvm/gems/ruby-1.9.3-p448/bin:$PATH"
# export PATH="/usr/local/rvm/gems/ruby-1.9.3-p448@global/bin:$PATH"
# export PATH="/usr/local/rvm/rubies/ruby-1.9.3-p448/bin:$PATH"
然后我重新运行命令并成功完成。
希望这有助于其他人。