I recently installed rubygems 1.3.7. When I try to install rails by typing :gem install rails I get an error like this:
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
It looks like your Ruby install is missing the zlib extension.
If you installed Ruby from source, make sure that you have the appropriate development headers (in Fedora – zlib-devel, in Ubuntu – libzlib-dev or something like this).
You can check if it’s installed by running the following command: