Mkmf.rb Can't Find Header Files For Ruby Macos

This happened to me after upgrading MacOS to version “High Sierra” on my MacBook. I cloned my application repository and went to execute a bundle install command, but it throws the following error message:

So I tried to enter password and install the bundled gems to RubyGems using sudo. But this did not solve the problem and here’s what I saw:

List Of C++ Header Files

In this error message, we are prompted to install the gem ffi by using the following command:

  1. Ruby製のソフトウェアはこの手の問題が発生しやすいイメージが強いのですが何とかならんもんですかね(´・ω・`) Rubyと聞くと反射的に「ウッ」と変な声が出るようになりましたよw 自分でゼロから書く分には良いのでしょうが。.
  2. Ruby製のソフトウェアはこの手の問題が発生しやすいイメージが強いのですが何とかならんもんですかね(´・ω・`) Rubyと聞くと反射的に「ウッ」と変な声が出るようになりましたよw 自分でゼロから書く分には良いのでしょうが。.

This did not help, and the same with the use of sudo. Then I decided to try set a location other than my system’s gem repository. Moreover, in the first error message we were asked about this option.

List of c++ header files

Mkmf.rb Can't Find Header Files For Ruby Macos Download

Stack Exchange Network. Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange.

Mkmf.rb can

Looks good. Let’s now try to run the bundle install command:

And it worked.

Conclusion

That’s it, you’re done. So simple isn’t it?

If you are having trouble fixing this problem with the instructions above, but are being able to solve this problem with any another method please describe it in the comment section below. Thanks!

Ruby

If this article helped you solve the problem then please leave a comment

Thanks for reading!

Arthur is a designer and full stack software engineer. He is the founder of Space X-Chimp and the blog My Cyber Universe. His personal website can be found at arthurgareginyan.com.

Mkmf.rb Can't Find Header Files For Ruby Osx

Follow Arthur