我刚刚转移到 Ubuntu 8.10 作为我的开发工具箱;这是我第一次认真尝试将 Linux 作为日常使用的操作系统,我很难让 Rails 运行起来。我遵循了许多似乎都可以正常工作的教程,但是当我尝试在任何东西上使用 gem install 或 gem update 时,我得到一个看起来像这样的错误:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:5
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:167:in `load_and_instantiate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:88:in `[]'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:144:in `find_command'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:131:in `process_args'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'
from /usr/local/bin/gem:21
我已经(按照教程中的建议)安装了 zlib、zlib1g 和 zlib1g-dev。我什至找到了一些关于这个特定问题的教程(但是,所有这些都是针对我以外的口味),但它们没有帮助。
我在 Ubuntu 8.10,ruby 版本 1.8.8dev gem 版本 1.3.2
我试过分别重新安装红宝石和宝石,但无济于事。