Tuesday, January 31, 2012

Getting error "can't activate sqlite3 (~> 1.3.5), already activated sqlite3-1.3.4" when upgrading to Rails 3.2

Upgradation from Rails 3.1 to Rails 3.2 done successfully. When starting server, getting error :

Exiting
/home/ritesh/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:153:in `block in replace_gem': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (can't activate sqlite3 (~> 1.3.5), already activated sqlite3-1.3.4. Make sure all dependencies are added to Gemfile.) (LoadError)
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:3:in `<top (required)>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:234:in `block in load_dependency'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:639:in `new_constants_in'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:234:in `load_dependency'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in `resolve_hash_connection'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in `resolve_string_connection'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in `spec'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in `establish_connection'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/railtie.rb:76:in `block (2 levels) in <class:Railtie>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.0/lib/active_record/base.rb:709:in `<top (required)>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-identity-1.0.0/lib/omniauth/identity/models/active_record.rb:6:in `<module:Models>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-identity-1.0.0/lib/omniauth/identity/models/active_record.rb:5:in `<module:Identity>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-identity-1.0.0/lib/omniauth/identity/models/active_record.rb:4:in `<module:OmniAuth>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-identity-1.0.0/lib/omniauth/identity/models/active_record.rb:3:in `<top (required)>'
from /home/ritesh/projects/projects/crowd/app/models/crowd/credential.rb:1:in `<top (required)>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:469:in `load'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:469:in `block in load_file'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:639:in `new_constants_in'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:468:in `load_file'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:353:in `require_or_load'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:502:in `load_missing_constant'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:192:in `block in const_missing'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:190:in `each'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:190:in `const_missing'
from /home/ritesh/projects/projects/crowd/config/initializers/omniauth.rb:4:in `block in <top (required)>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-1.0.0/lib/omniauth/builder.rb:7:in `initialize'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:43:in `new'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:43:in `build'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:112:in `block in build'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:112:in `each'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:112:in `inject'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/middleware/stack.rb:112:in `build'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/engine.rb:470:in `app'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/application/finisher.rb:32:in `block in <module:Finisher>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `run'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `each'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/application.rb:136:in `initialize!'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/ritesh/projects/projects/crowd/spec/dummy/config/environment.rb:5:in `<top (required)>'
from /home/ritesh/projects/projects/crowd/spec/dummy/config.ru:4:in `require'
from /home/ritesh/projects/projects/crowd/spec/dummy/config.ru:4:in `block in <main>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /home/ritesh/projects/projects/crowd/spec/dummy/config.ru:1:in `new'
from /home/ritesh/projects/projects/crowd/spec/dummy/config.ru:1:in `<main>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands/server.rb:46:in `app'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands/server.rb:70:in `start'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `tap'
from /home/ritesh/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `<top (required)>'
from /home/ritesh/projects/projects/crowd/spec/dummy/script/rails:6:in `require'
from /home/ritesh/projects/projects/crowd/spec/dummy/script/rails:6:in `<top (required)>'
from script/rails:6:in `load'
from script/rails:6:in `<main>'


To fix the error:

Change the sqlite version in .gemspec from
s.add_development_dependency "sqlite3"
to
s.add_development_dependency "sqlite3" , "~> 1.3.5"

and run 'bundle install'

No comments:

Post a Comment