Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replace_gem: Error loading the 'sqlite3' Active Record adapter - while creating model

I am getting an error while creating a model in the created project and the error is as follows,

/home/sushmitha/.rvm/gems/ruby-2.5.1/gems/bundler-2.0.1/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)

like image 879
gangothri Avatar asked Feb 05 '19 07:02

gangothri


1 Answers

For rails 5.2.2 explicitly , update your Gemfile to sqlite to:

gem 'sqlite3', '~> 1.3.6'

and in terminal use :

bundle update
like image 62
Himanshu Jotwani Avatar answered Oct 20 '22 13:10

Himanshu Jotwani