First Rails Application (Part 2.3) Error: rails generate scaffold car make:string model:string year:integer


#1

I have been digging through the forum for the past hour or so searching for the solution to a LoadError following ’ rails generate scaffold car make:string model:string year:integer ’ :

Sarahs-MacBook-Pro-2:my_first_rails_app sarahkaplan$ rails generate scaffold car make:string model:string year:integer
/Users/sarahkaplan/.rbenv/versions/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) from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:inblock in require_with_bootsnap_lfi’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:inrequire_with_bootsnap_lfi’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:inblock in require’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in load_dependency' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:inrequire’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in spec' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:inestablish_connection’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in establish_connection' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:inblock (2 levels) in class:Railtie
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in instance_eval' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:inblock in execute_hook’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in with_execution_control' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:inexecute_hook’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in block in run_load_hooks' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:ineach’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in run_load_hooks' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/base.rb:328:inmodule:ActiveRecord
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in <main>' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:inrequire’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:inregister’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:inrequire’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in block in require' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:inload_dependency’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in require' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:356:inactive_record_configured?’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:273:in disconnect_database' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:107:inpreload’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:153:in serve' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:141:inblock in run’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:135:in loop' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application.rb:135:inrun’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in <top (required)>' from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:inrequire’
from /Users/sarahkaplan/.rbenv/versions/2.6.0/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' from -e:1:in

I read several posts that listed similar issues but am still unable to fix the issue. My apologies if I have somehow overlooked a post that has already responded to this issue! Thanks folks.


#2

This should resolve things for you Sqlite3 error when trying to migrate the database (2.3 First rails app)