Hi colin, I tried what you said, It reinstalled the ruby then rails, but when it downloaded the nokogiri184.108.40.206.gem, it showed error. But anyway rails was installed. When i checked the version it shows
~$ rails -v
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring nokogiri-220.127.116.11 because its extensions are not built. Try: gem pristine nokogiri --version 18.104.22.168
You may want to ask on the Nokogiri mailing list (email@example.com) -- they are very good (and quick) about installation problems. Also, as Colin mentioned, rvm can make things very straightforward for you, not least because it does a ton of work to make sure your build environment is "sane" before it tries to install anything. If you can't build Nokogiri on a *nix machine, then there is very likely something funny with your compiler or system libraries, and rvm will tell you about that, down to which Debian package to use or which source to compile or which Homebrew package to install to get it working. Current and recent versions of Nokogiri bundle all the dependencies (time was you needed a working libxml of a certain vintage to make it go) but you still need a working compiler and link tool.