Error:failed to build gem native extension

Source: Internet
Author: User
Tags ruby on rails

The Ruby on Rails Web site says that running gem install rails after installing Ruby is good.

But the whole process took me a couple of hours. First of all, OpenSUSE 13.1 comes with Ruby 2.0.0p-247, and I offload Ruby because I intend to use rbenv to manage Ruby:

$ sudo zypper rm Ruby

As a result, Konsole is gone, YAST is gone, and it seems that the KDE desktop has been unloaded.

Then you will have to use the system itself. But the gem install rails has an error:

Building native extensions. This is could take a while ...

Error:error Installing rails:

Error:failed to build gem native extension.

/usr/bin/ruby2.0 extconf.rb

MKMF.RB can ' t find header files for Ruby At/usr/lib/ruby/include/ruby.h

Gem files would remain installed in/usr/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.

Results logged To/usr/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out

Gem install compass is no problem.

The information on the net says to install Ruby-devel:

sudo zypper in Ruby-devel

Install Rails again, as you can see, from the time I started writing this to now, it's still in the installation. But then it was finally installed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.