【问题标题】:Gem install problems Mac 10.11.5 ('no implicit conversion of nil into String')Gem 安装问题 Mac 10.11.5('没有将 nil 隐式转换为字符串')
【发布时间】:2016-11-04 18:51:58
【问题描述】:

我正在尝试做 gem install jekyll(或 github-pages),但没有任何效果。

> rvm install current && rvm use current
ruby-2.3.1
Using /Users/willwade/.rvm/gems/ruby-2.3.1
> gem install jekyll
ERROR:  While executing gem ... (TypeError)
no implicit conversion of nil into String

我尝试了不同的版本。例如1.9.3 及其类似的输出。例如。

> rvm use 1.9.3
Using /Users/willwade/.rvm/gems/ruby-1.9.3-p551
> gem install github-pages
Fetching: terminal-table-1.6.0.gem (100%)
Successfully installed terminal-table-1.6.0
Fetching: mercenary-0.3.6.gem (100%)
Successfully installed mercenary-0.3.6
Fetching: ffi-1.9.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.10
Fetching: rb-inotify-0.9.7.gem (100%)
Successfully installed rb-inotify-0.9.7
Fetching: rb-fsevent-0.9.7.gem (100%)
Successfully installed rb-fsevent-0.9.7
Fetching: listen-3.0.6.gem (100%)
Successfully installed listen-3.0.6
Fetching: jekyll-watch-1.4.0.gem (100%)
Successfully installed jekyll-watch-1.4.0
Fetching: sass-3.4.22.gem (100%)
Successfully installed sass-3.4.22
Fetching: jekyll-sass-converter-1.3.0.gem (100%)
Successfully installed jekyll-sass-converter-1.3.0
Fetching: rouge-1.10.1.gem (100%)
ERROR:  While executing gem ... (TypeError)
    can't convert nil into String

我也试过系统版本,例如用 sudo

> sudo gem install jekyll
Fetching: liquid-3.0.6.gem (100%)
Successfully installed liquid-3.0.6
Fetching: kramdown-1.11.1.gem (100%)
ERROR:  While executing gem ... (TypeError)
no implicit conversion of nil into String

(编辑)和2.2.0一样:

> rvm use 2.2.0
Using /Users/willwade/.rvm/gems/ruby-2.2.0
> gem install github-pages
Fetching: terminal-table-1.6.0.gem (100%)
Successfully installed terminal-table-1.6.0
Fetching: mercenary-0.3.6.gem (100%)
Successfully installed mercenary-0.3.6
Fetching: ffi-1.9.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.10
Fetching: rb-inotify-0.9.7.gem (100%)
Successfully installed rb-inotify-0.9.7
Fetching: rb-fsevent-0.9.7.gem (100%)
Successfully installed rb-fsevent-0.9.7
Fetching: listen-3.0.6.gem (100%)
Successfully installed listen-3.0.6
Fetching: jekyll-watch-1.4.0.gem (100%)
Successfully installed jekyll-watch-1.4.0
Fetching: sass-3.4.22.gem (100%)
Successfully installed sass-3.4.22
Fetching: jekyll-sass-converter-1.3.0.gem (100%)
Successfully installed jekyll-sass-converter-1.3.0
Fetching: rouge-1.10.1.gem (100%)
ERROR:  While executing gem ... (TypeError)
no implicit conversion of nil into String

关于修复的任何想法?这可能是什么?

【问题讨论】:

    标签: ruby macos rvm osx-elcapitan


    【解决方案1】:

    您可以尝试以下方法之一:

    • 降级到以前的 gem
    • 确保页面没有语法错误
    • 确保配置文件不为空

    希望其中之一有所帮助。

    【讨论】:

      【解决方案2】:

      我不知道是什么导致了头痛。但这为我解决了问题:

      1. 重启 mac。
      2. Command + R
      3. 打开一个终端。输入csrutil disable
      4. 重启
      5. gem install jekyll 或 sudo..(即使用系统 ruby​​)
      6. 重复步骤 1 和 2 - 并输入 csrutil enable

      El Capitan 和 Ruby 基本上存在 SIP 问题。请参阅 https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-03-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多