0

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.

  • Can you post your config/database.yml file? – Diego Senott Aug 13 '15 at 12:29
  • development: adapter: mysql2 encoding: utf8 database: abc_development username: root password: socket: /tmp/mysql.sock test: adapter: mysql2 encoding: utf8 database: abc_test username: root password: socket: /tmp/mysql.sock production: adapter: mysql2 encoding: utf8 database: abc_development username: root password: socket: /tmp/mysql.sock – Chiranjib Roy Aug 13 '15 at 13:43
  • Everything seems fine. Have you tried to clean your gems in case there's some old thing not being used anymore? You can run: $ bundle clean --force – Diego Senott Aug 13 '15 at 13:46

0 Answers0