抛出异常:RubyGem版本错误:activerecord(2.3.8 not> = 3.0.3)

时间:2011-02-17 05:02:30

标签: ruby-on-rails ruby rubygems

我一直收到这个错误,我很难过。所以应用程序在rails 2.3.8中,这是我的宝石列表

*** LOCAL GEMS ***

aaronh-chronic (0.3.9)
abstract (1.0.0)
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
arel (2.0.8)
builder (2.1.2)
bundler (1.0.10)
daemon_controller (0.2.6)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
passenger (3.0.2)
polyglot (0.3.1)
rack (1.1.0)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (2.3.8)
railties (3.0.4)
rake (0.8.7)
riddle (1.2.2)
rubygems-update (1.5.2)
spruz (0.2.5)
thinking-sphinx (2.0.2)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
whenever (0.6.2)

我有rubygems 1.3.7并且我降级到1.3.5并且错误仍然存​​在......

gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

我该怎么做才能解决

2 个答案:

答案 0 :(得分:0)

可能是“远程来源”,请尝试:

gem sources -r http://gems.rubyonrails.org

然后添加:

gem sources -a http://rubygems.org/

另外......您可以在environment.rb文件(RoR 2.X)或Gemfile(RoR 3.X)中发布您要求的宝石

答案 1 :(得分:0)

只需将config/environment.rb文件中的rails版本编辑为2.3.8

即可