Switching from pq to sqlite3 ruby on rails -
i'm getting error after trying change pg sqlite3.
rake db:reset rake aborted! gem::loaderror: specified 'postgresql' database adapter, gem not loaded. add `gem 'pg'` gemfile (and ensure version @ minimum required activerecord). /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in `establish_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:railtie>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `each' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `on_load' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!' /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>' gem::loaderror: pg not part of bundle. add gemfile. /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.15.1/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/postgresql_adapter.rb:16:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:175:in `spec' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in `establish_connection' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:railtie>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `each' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `on_load' /usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!' /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks' /usr/local/rvm/gems/ruby-2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>' tasks: top => db:reset => environment (see full trace running task --trace)
now know activerecord telling me add pg gem machine having error running pq server (rather being productive , fixing it, i'm being lazy trying put sqlite on deve , keeping pg on product)
any tips on how solve this?
please, try change adapter
in config/database.yml
postgresql
sqlite3
.
it should help.
Comments
Post a Comment