Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why i am getting error while creating Controller/Model?

I created a new app named Useremail, but on terminal when I'm creating controller/model, it's throwing an error and not generating controller/model.

ac@ac-HP:~/Useremail$ bin/rails g controller Users

/home/ac/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/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 367
Ayush Avatar asked Jan 27 '23 18:01

Ayush


1 Answers

In your project Gemfile, mention the version for the gem 'sqlite3' as gem 'sqlite3', '~> 1.3.6'

Then bundle install

like image 157
Ragavi Avatar answered Feb 03 '23 13:02

Ragavi