Failed to build gem native extension — Rails install

前端 未结 3 1705
星月不相逢
星月不相逢 2020-12-02 08:42

I have been installing Ruby on Rails based on the instruction from edX online class.

Here is a list of terminal commands, and, where relevant, corresponding output

相关标签:
3条回答
  • 2020-12-02 08:58

    mkmf is part of the ruby1.9.1-dev package. This package contains the header files needed for extension libraries for Ruby 1.9.1. You need to install the ruby1.9.1-dev package by doing:

    sudo apt-get install ruby1.9.1-dev
    

    Then you can install Rails as per normal.

    Generally it's easier to just do:

    sudo apt-get install ruby-dev
    
    0 讨论(0)
  • 2020-12-02 09:02

    The suggested answer only works for certain versions of ruby. Some commenters suggest using ruby-dev; that didn't work for me either.

    sudo apt-get install ruby-all-dev
    

    worked for me.

    0 讨论(0)
  • 2020-12-02 09:06
    sudo apt-get install ruby-dev
    

    worked for me

    0 讨论(0)
提交回复
热议问题