Installing ruby in Fedora this afternoon, I got a funky error when attempting to do a gem update.

# yum install -y ruby
# gem update

Building native extensions. This could take a while...
ERROR:  Error installing shimabowl:
        ERROR: Failed to build native gem extension.
    /usr/bin/ruby extconf.rb
shimabowl.rb can't find header files for ruby at /usr/share/include/ruby.h

For a split second, I thought maybe my username was in conflict with a ruby directory. My name is Ruben, and some of my usernames are… well, yeah.

Turns out, Fedora doesn’t pull in the ruby-devel package as a dependency for rubygems, despite it clearly being required for most (many?) gems. So it’s just a matter of getting those as well:

# yum install -y ruby-devel
# gem update
Updating installed gems
Updating shimabowl
Fetching shimabowl-1.0.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed shimabowl-1.0.0
Parsing documentation for simapan-1.0.0
Installing ri documentation for shimabowl-1.0.0
Done installing documentation for shimabowl after 2 seconds

Done and done.