2011-10-26 71 views
0

我最近更新了我的rails從3.0.3到3.1.1。我已經完成了他們要求我爲進一步依賴安裝(例如「開發工具包」)所做的所有流程,並且我已經完成了所有工作。無論如何,當我回到運行命令提示符(Windows)的應用程序時,我遇到了如下問題。升級後rails版本sqlite3適配器錯誤版本

C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_record/connect 
ion_adapters/abstract/connection_specification.rb:71:in `rescue in establish_con 
nection': Please install the sqlite3 adapter: `gem install activerecord-sqlite3- 
adapter` (RubyGem version error: sqlite3(1.3.3 not ~> 1.3.4) (RuntimeError) 
) 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/connection_adapters/abstract/connection_specification.rb:68:in `establish_ 
connection' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/connection_adapters/abstract/connection_specification.rb:60:in `establish_ 
connection' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/connection_adapters/abstract/connection_specification.rb:55:in `establish_ 
connection' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/railtie.rb:69:in `block (2 levels) in <class:Railtie>' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_ 
support/lazy_load_hooks.rb:36:in `instance_eval' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_ 
support/lazy_load_hooks.rb:36:in `execute_hook' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_ 
support/lazy_load_hooks.rb:43:in `block in run_load_hooks' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_ 
support/lazy_load_hooks.rb:42:in `each' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_ 
support/lazy_load_hooks.rb:42:in `run_load_hooks' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/base.rb:2190:in `<top (required)>' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/lib/active_r 
ecord/railtie.rb:34:in `block in <class:Railtie>' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railti 
e.rb:178:in `call' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railti 
e.rb:178:in `block in load_console' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railti 
e.rb:178:in `each' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/railti 
e.rb:178:in `load_console' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine 
.rb:407:in `block in load_console' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/applic 
ation/railties.rb:8:in `each' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/applic 
ation/railties.rb:8:in `all' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine 
.rb:407:in `load_console' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/applic 
ation.rb:115:in `load_console' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/comman 
ds/console.rb:27:in `start' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/comman 
ds/console.rb:8:in `start' 
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/comman 
ds.rb:40:in `<top (required)>' 
    from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:i 
n `require' 
    from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:i 
n `rescue in require' 
    from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:i 
n `require' 
    from script/rails:6:in `<main>' 

我試圖通過安裝缺失的sqlite的1.3.3組件來解決這個問題,但
事情似乎並沒有從我迎刃而解。

任何意見,將非常感激。

回答

0

是不是說它需要1.3.4?在你的Gemfile

變化的sqlite3到

gem "sqlite3", "~> 1.3.4" 

然後運行包。