Question

Im trying to do a migration in my server but i get this code when i do rake db:migrate . I did it perfectly on my computer.

Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.)
/home/magnet/.rvm/gems/ruby-1.9.3-p448@global/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/sqlite3_adapter.rb:3:in `<top (required)>'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:25:in `each'
/home/magnet/liga7/shared/bundle/ruby/1.9.1/gems/activesupport-

.....

Does someone know what to do ?

Thank you very much

Was it helpful?

Solution

Better you could you gem pg,because it will support all database adapter,

Add in Gemfile

gem 'pg'

then

bundle install

then start migrate.

OTHER TIPS

Add this to Gemfile

gem 'sqlite3'

And then

bundle install
rake db:create
rake db:migrate

And if it doesnot help then replace the line

gem 'sqlite3'

with

gem 'sqlite3', '1.3.9'    

and run the above commands. And if it doesnot help then install sqlite on your system if it is not installed and repeat the above process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top