Error Installing Gems
I spun up a new instance on Amazon AWS to learn some ruby for one of my classes online and notice I kept getting the below error:
[ec2-user@ip-xx-xx-xx-xx ~]$ sudo gem install Fetching: xxxxxxxxxxxxxxxxxxxx (100%) Successfully xxxxxxxxxxx Fetching: multi_json-1.10.1.gem (100%) Successfully installed multi_json-1.10.1 Fetching: rubyzip-1.1.6.gem (100%) Successfully installed rubyzip-1.1.6 Fetching: ffi-1.9.3.gem (100%) Building native extensions. This could take a while... ERROR: Error installing xxxxx: 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 /usr/local/share/ruby/gems/2.0/gems/ffi-1.9.3 for inspection. Results logged to /usr/local/share/ruby/gems/2.0/gems/ffi-1.9.3/ext/ffi_c/gem_make.out [ec2-user@ip-xx-xx-xx-xx ~]$
The above is easy to fix when using ruby gems to install new gems by installing ruby-devel make gcc.
sudo yum install ruby-devel make gcc