0

我正在使用 Rails 2.3.8 + redis + resque + redis-namespace

这是我的一部分environment.rb

  config.gem 'jrails'
  config.gem 'haml'
  config.gem 'redis'
  config.gem 'redis-namespace'
  config.gem 'resque

这是我的gem list

redis (2.0.3)
redis-namespace (0.7.0)
resque (1.9.7)

当我通过“脚本/服务器”启动我的服务器时,它显示了这样的异常:

=> Rails 2.3.8 application starting on http://0.0.0.0:3000
no such file to load -- redis-namespace
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:215:in `load'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:164:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
/mnt/workspace/webtails/config/environment.rb:9

我已经重新安装redis-namespace了很多次,它总是显示这个错误消息。哪里错了?

4

1 回答 1

1

因为这个文件不存在。你需要'redis/namespace'

config.gem 'redis-namespace', :lib => 'redis/namespace'
于 2010-07-12T09:55:44.403 回答