title: Trouble with gem installations
body: <p>I am in a coding bootcamp and I have encountered an error in which I am having a hard time fixing. I currently in an exercise where I am learning how to create dynamic routes. Every time I run my server I am getting errors when I go to my routes and it states that:</p>
  
  <pre><code>Could not find nokogiri-1.8.2 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>I tried to <code>bundle install</code> after adding <code>nokogiri</code> to my gemfile but all I get is this error below. I need some help cause I don't know what is going on and I am a total noob in regards to this stuff.</p>
  
  <pre><code>Ignoring unf_ext-0.0.7.5 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.5
  Ignoring websocket-driver-0.7.0 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.0
  Fetching gem metadata from http://rubygems.org/........
  Using rake 12.3.0
  Using concurrent-ruby 1.0.5
  Using i18n 0.9.5
  Using minitest 5.11.3
  Using thread_safe 0.3.6
  Using tzinfo 1.2.5
  Using activesupport 5.1.5
  Using activemodel 5.1.5
  Using arel 8.0.0
  Using activerecord 5.1.5
  Using public_suffix 3.0.2
  Using addressable 2.5.2
  Using bundler 1.16.6
  Using mini_mime 1.0.0
  Using mini_portile2 2.3.0
  Fetching nokogiri 1.8.2
  Installing nokogiri 1.8.2 with native extensions
  Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  
  current directory:
  /Users/kenkuts/.rvm/gems/ruby-2.5.0/gems/nokogiri-1.8.2/ext/nokogiri
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
  ./siteconf20181215-54662-1izm05e.rb extconf.rb --use-system-libraries
  Ignoring unf_ext-0.0.7.5 because its extensions are not built. Try: gem pristine
  unf_ext --version 0.0.7.5
  Ignoring websocket-driver-0.7.0 because its extensions are not built. Try: gem
  pristine websocket-driver --version 0.7.0
  checking if the C compiler accepts ... *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of necessary
  libraries and/or headers.  Check the mkmf.log file for more details.  You may
  need configuration options.
  
  Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
  --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)
      --help
      --clean
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:456:in
  `try_do': The compiler failed to generate an executable file. (RuntimeError)
  You have to install development tools first.
  from
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:571:in
  `block in try_compile'
  from
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:522:in
  `with_werror'
  from
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:571:in
  `try_compile'
      from extconf.rb:138:in `nokogiri_try_compile'
      from extconf.rb:162:in `block in add_cflags'
  from
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/mkmf.rb:629:in
  `with_cflags'
      from extconf.rb:161:in `add_cflags'
      from extconf.rb:410:in `&lt;main&gt;'
  
  To see why this extension failed to compile, please check the mkmf.log which can
  be found here:
  
  /Users/kenkuts/.rvm/gems/ruby-2.5.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.8.2/mkmf.log
  
  extconf failed, exit code 1
  
  Gem files will remain installed in
  /Users/kenkuts/.rvm/gems/ruby-2.5.0/gems/nokogiri-1.8.2 for inspection.
  Results logged to
  /Users/kenkuts/.rvm/gems/ruby-2.5.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.8.2/gem_make.out
  
  An error occurred while installing nokogiri (1.8.2), and Bundler cannot
  continue.
  Make sure that `gem install nokogiri -v '1.8.2' --source 'http://rubygems.org/'`
  succeeds before bundling.
  
  In Gemfile:
    capybara was resolved to 2.18.0, which depends on
      xpath was resolved to 3.0.0, which depends on
        nokogiri
  </code></pre>