这段时间把centos换成ubuntu后,环境重装,在装rails时出现了以下错误:
afeicool@localhost:~$ gem install rails ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand
解决方案:
apt-get install zlib-bin zlib1g-dev cd path/to/your ruby source dir/ext/zlib ruby extconf.rb –with-zlib-include=/usr/include –with-zlib-lib=/usr/lib make make install