Error occurred while installing mini_racer (0.2.0)

Problem solve after change mini_racer gem version

mini_racer (0.2.1)

In docker-compose with Docker image like ruby, you can try:

  1. Delete Gemfile.lock inside image
  2. Run bundle install again.

I ran into the exact same issue on OS X Mojave with exact same stack trace as above. The following solution fixed it for me: (Credit to author of this blog Dave Kimura): https://blog.driftingruby.com/updated-to-mojave/ Solution was simply:

  1. Make sure you have installed xcode tools (skip if already done)

    xcode-select --install

  2. Now run the following command and follow the on-screen installer

    open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

That's it. Now mini_racer should install happily.