rails 2.3.4 中的 Gem 依赖错误 [英] Gem dependency error in rails 2.3.4

查看:48
本文介绍了rails 2.3.4 中的 Gem 依赖错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Rails 工作……我的 gem 列表是

i am working in Rails .. my gem list is

*** LOCAL GEMS ***

   abstract (1.0.0)
 actionmailer (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4, 2.3.2)
 actionpack (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4, 2.3.2)
activemodel (3.0.4, 3.0.3)
  activerecord (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4)
  activeresource (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4)
  activesupport (3.0.4, 3.0.3, 2.3.11, 2.3.10, 2.3.8, 2.3.4, 2.3.2)
  acts-as-taggable-on (2.0.6)
    acts_as_ferret (0.4.8, 0.4.2)
 acts_as_versioned (0.6.0)
 after_commit (1.0.8, 1.0.7)
 annotate (2.4.0)
  annotate-models (1.0.4)
 arel (2.0.8, 2.0.7, 2.0.6)
  autotest-rails (4.1.0)
 babosa (0.2.1, 0.2.0)
 bcrypt-ruby (2.1.4, 2.1.3, 2.1.2)
  builder (3.0.0, 2.1.2)
     bundler (1.0.10, 1.0.7)
     cgi_multipart_eof_fix (2.5.0)
    ClothRed (0.4.1)
      coderay (0.9.6, 0.9.5, 0.9.3, 0.8.357)
     configuration (1.1.0)
     cucumber (0.8.5)
      daemons (1.1.0, 1.0.10)
    delayed_job (2.1.2, 2.0.5, 2.0.4, 2.0.3)
     devise (1.1.5)
        diff-lcs (1.1.2)
     docsplit (0.5.0)
     echoe (4.3.1, 3.0.2)
    erubis (2.6.6)
    factory_girl (1.3.2, 1.2.3)
    fastthread (1.0.7, 1.0.1)
      ferret (0.11.6)
      friendly_id (3.2.0)
       gem_plugin (0.2.3)
       gemcutter (0.6.1)
      gherkin (2.2.0, 2.1.5)
       gm (1.0.4)
  haml (3.0.25)
     highline (1.6.1, 1.5.0)
   hoe (2.6.1, 1.12.2)
    hpricot (0.8.3, 0.8.2, 0.8.1)
    htmldoc (0.2.3, 0.2.1)
     i18n (0.5.0)
   io-reactor (1.0.4)
    jquery-rails (0.2.6)
   jslint_on_rails (1.0.5)
 json_pure (1.4.6, 1.4.3)
    launchy (0.3.7, 0.3.5)
   mail (2.2.15, 2.2.14, 2.2.13)
    memcache-client (1.8.5)
   memcached (1.0.6)
  mime-types (1.16)
    mini_magick (1.3.2, 1.2.3)
   mocha (0.9.10)
   mongrel (1.1.5)
    mysql (2.8.1)
     mysql2 (0.2.6)
    net-ldap (0.1.1)
    newgem (1.5.3, 1.3.0)
     oauth (0.4.4, 0.4.1, 0.3.6, 0.3.2)
   oauth-plugin (0.3.14)
   paperclip (2.3.8)
     passenger (2.2.15, 2.2.5, 2.1.2, 2.0.6)
   pg (0.9.0, 0.8.0)
  polyglot (0.3.1)
 prawn (0.8.4)
    prawn-core (0.8.4)
  prawn-format (0.2.3)
 prawn-js (0.7.1)
   prawn-layout (0.8.4)
   prawn-security (0.8.4)
  rack (1.2.1, 1.1.0, 1.0.1, 0.9.1)
   rack-mount (0.6.13)
  rack-test (0.5.7)
  rails (3.0.4, 2.3.11, 2.3.8, 2.3.4)
   railties (3.0.4, 3.0.3)
      rake (0.8.7, 0.8.4, 0.8.1)
  RedCloth (4.2.3, 4.1.1)
    riddle (1.2.2, 1.2.1, 1.0.12)
    rspec (1.3.0)
     rspec-rails (1.3.2)
     rubigen (1.5.5, 1.5.2)
     ruby-hmac (0.4.0, 0.3.2)
      Ruby-MemCache (0.0.1)
     rubyforge (2.0.4, 1.0.3, 1.0.1)
     rubygems-update (1.4.2)
    slim_scrooge (1.0.11)
   sqlite3-ruby (1.3.2, 1.3.1, 1.2.5, 1.2.4)
    subexec (0.0.4)
       syntax (1.0.0)
      term-ansicolor (1.0.5)
     thinking-sphinx (1.4.1, 1.4.0, 1.3.18)
    thor (0.14.6)
 treetop (1.4.9)
  trollop (1.16.2)
    ts-delayed-delta (1.1.1, 1.1.0)
        tzinfo (0.3.24, 0.3.23)
     warden (1.0.3, 1.0.2)
web-app-theme (0.6.3)
   will_paginate (3.0.pre2)
     yaml_db (0.2.0)
       ZenTest (4.3.3)

我有上面的宝石列表

当我运行我的应用程序时

When i run my application

  script/server
  => Booting Mongrel
 => Rails 2.3.4 application starting on http://0.0.0.0:3000
 /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xb7181c78> (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:254:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1204:in `gem'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:73:in `add_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:301:in `add_gem_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:301:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:301:in `add_gem_load_paths'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:132:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
from /home/user/application/config/environment.rb:19
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from script/server:3

我收到上述错误..

如何解决这个问题??

推荐答案

发生这种情况是因为您安装的 RubyGems 对于您的 Rails 版本来说太新了.降级(并重新运行 update_rubygems)或将 Rails 升级到 2.3.11.

This is happening because you installed RubyGems that is too new for your version of Rails. Either downgrade (and re-run update_rubygems) or upgrade Rails to 2.3.11.

这篇关于rails 2.3.4 中的 Gem 依赖错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆