rubys/nokogumbo — pull request #3 by mattwildig (2014-04-07 22:19:00+00:00)
Title: Fix install

Installing the gem is failing for me with `` `require': cannot load such file -- /Users/matt/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/../../extensions/x86_64-darwin-10/2.1.0/nokogiri-1.6.1/nokogiri/extconf.rb (LoadError) ``. This seems to be caused by `extconf.rb` calling `Gem.find_files('nokogiri')` and assuming that the results are all something like `lib/nokogiri` – i.e. they all point to Nokogiri’s `lib` dir. On my machine `find_files` also returns items like this:

```
/Users/matt/.rvm/gems/ruby-2.1.1/gems/nokogiri-1.6.1/../../extensions/x86_64-darwin-10/2.1.0/nokogiri-1.6.1/nokogiri
```

and if that ends up the last in the array after it is sorted the install tries to use it to get the location of Nokogiri’s `extconf.rb` and fails.

This patch just filters the list returned from `find_files` to only include those entries matching `lib/nokogiri` so that the correct directory is used.

I’ve also updated `.gitignore` to not ignore a couple of files that should be tracked (including `extconf.rb` where the other fix is).