我安装了redis-2.2.2。但是在需要时我得到了例外:
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- redis (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from methods.rb:2
代码:
require 'rubygems'
require 'redis'
宝石清单如下:
activesupport (2.3.5, 2.2.3, 1.4.4)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
rails (2.3.5, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
redis (2.2.2)
rmagick (2.13.1)
rspec (1.3.2)
答案 0 :(得分:-1)
请尝试以下命令:
sudo gem install redis