When developing in Rails, you might encounter this error: Ignoring nokogiri because its extension are not built. Try Gem pristine nokogiri --version 1.10.3
Edit this Article
- Make sure that you include the version number of nokogiri in your Gem File and do: bundler install
- If bundler install does not resolve the issue, make sure that you install the nokogiri first, using gem install nokogiri -v '1.10.3' --source 'https://rubygems.org/'
- If number 1 does not fix the problem, try gem pristine --all (this will restore all gem dependencies in pristine condition)
- Another possible solution is backing up your files and then delete Vendor Folder and the GemFile.lock file, after that do, bundle install, to install fresh dependencies. This error happens when there is a conflict between the version in your Working Tree and that in the Vendor Cache system.
- Try running this command: bundle config build.nokogiri --use-system-libraries