Ruby on rails - Error during bundle install

前端 未结 2 1942
醉酒成梦
醉酒成梦 2021-02-19 07:56

I\'ve been googling this error below, but I can\'t solve this error:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 ext         


        
相关标签:
2条回答
  • 2021-02-19 08:27

    Had similar error on fedora when trying to install compass for SASS development

    gem install compass
    

    failed with

    Building native extensions. This could take a while... ERROR: Error installing compass: ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

    Ran this

    yum -y install gcc ruby-devel rubygems 
    

    and then was able to run the install again successfully.

    0 讨论(0)
  • 2021-02-19 08:35

    Try to install the ruby-dev library for your Ruby version which is 2.1

    $ sudo apt-get install ruby2.1-dev
    
    0 讨论(0)
提交回复
热议问题