Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to run gem install

I'm trying to get rails up and running on my development server. It's a fedora14 box. I installed rvm, ruby 1.8.7, and rubygems 1.6.2. When I try to install rails via gem, gem install rails, i get the following error:

ERROR: Loading command: install (LoadError)
    no such file to load -- zlib
ERROR: While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

Any ideas as to what is going on. I'm 100% new to ruby/rubygems/rails and I know enough about Linux to be dangerous so any help/suggestions would be greatly appreciated.

Thanks in advance

like image 226
heymrcarter Avatar asked Jan 20 '23 12:01

heymrcarter


1 Answers

Run rvm notes and install whatever it tells you (zlib-devel will probably be one of the packages you'll need to install via yum). The output you'll see will be similar to this:

  # For Ruby (MRI & Ree) you should install the following OS dependencies:
  ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
        yum install -y make bzip2 ;
        yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(
like image 54
Dylan Markow Avatar answered Jan 22 '23 02:01

Dylan Markow