Don’t assume installation has failed unless you see an error message or you’ve waited more than ten minutes.
If installation fails, make sure your system is configured properly (look for help on Stack Overflow).
It is important to set up your development environment with the most current version of all the gems that are needed for development.
Developers often install the newest version of Rails but neglect other components needed for Rails to run successfully. The Rails Apps project provides example applications that developers use as starter apps.
As such, if your system environment doesn’t match Nokogiri’s requirements, compilation of Nokogiri will fail.