代码之家  ›  专栏  ›  技术社区  ›  Dhinakaran

忽略gems,因为它的扩展未构建[重复]

  •  15
  • Dhinakaran  · 技术社区  · 6 年前

    我在我的机器上安装了导轨

    ruby 2.3.1

    钢轨5.1.4

    Ubuntu 16.04操作系统

    rails安装后,当我检查rails版本时 rails -v 它抛出忽略“一些宝石列表”,因为它的扩展未构建

    Ignoring nokogiri-1.8.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.1
    Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
    Ignoring byebug-9.1.0 because its extensions are not built.  Try: gem pristine byebug --version 9.1.0
    Ignoring curb-0.9.4 because its extensions are not built.  Try: gem pristine curb --version 0.9.4
    Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
    Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
    Ignoring gem-wrappers-1.3.2 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.3.2
    Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
    Ignoring nio4r-2.2.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.2.0
    Ignoring pg-0.21.0 because its extensions are not built.  Try: gem pristine pg --version 0.21.0
    Ignoring websocket-driver-0.6.5 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.6.5
    Rails 5.1.4
    

    成功创建新rails应用程序后 当我跑步时 bundle install 它抛出错误消息,如:

    An error occurred while installing json (1.8.6), and Bundler cannot continue.
    Make sure that `gem install json -v '1.8.6'` succeeds before bundling.
    
    1 回复  |  直到 6 年前
        1
  •  46
  •   Sachin Khosla    5 年前

    我执行了命令 gem pristine --all 删除所有错误

    切换ruby版本时会发生此错误