66
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

"mkmf.rb can't find header files for ruby"の対応

今日のはまりどころ

$ gem install bson_ext -v '1.10.2'
Building native extensions.  This could take a while...
ERROR:  Error installing bson_ext:
        ERROR: Failed to build gem native extension.

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


Gem files will remain installed in /home/ec2-user/.gem/ruby/2.0/gems/bson_ext-1.10.2 for inspection.
Results logged to /home/ec2-user/.gem/ruby/2.0/gems/bson_ext-1.10.2/ext/cbson/gem_make.out

$ less /home/ec2-user/.gem/ruby/2.0/gems/bson_ext-1.10.2/ext/cbson/gem_make.out
/usr/bin/ruby2.0 extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h

ぐぐる。

$ sudo yum -y install ruby-devel

いろんなものがgem install/bundle installできるようになった。

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
66
Help us understand the problem. What are the problem?