'Mysql2' is defined in database adapter, but its asking to add gem 'sqlite3'

449 Views Asked by At

I have recently upgraded rails to 4.2.X latest from 3.2.19. Also upgraded ruby to 2.2.2 from 1.9.2. When trying to run spec using $ rspec . command, I got this following error:

Could not load native IDN implementation. /Users.../vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:178:in rescue in spec': Specified 'sqlite3' for database adapter, but the gem is not loaded. Add gem 'sqlite3' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)

Used Mysql2 adapter for all environments. But it is asking to add sqlite3 in Gemfile.

After debugging inside ActiveRecord::ConnectionAdapters module, found this config hash {:adapter=>"sqlite3", :database=>":memory:"}. Don't know where it is getting sqlite3 adapter.

0

There are 0 best solutions below