How to fix the 'mysql2' error when loading rails console? - ruby-on-rails

I'm trying to start up the rails console ( not related to my previous questions since these are different errors ) and I can't, for the life of me, figure out how to fix this or what's even asking me to do. I'm running: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux].
I type in the rails console command and get the following:
ubuntu:~/environment/sample_app (sign-up) $ rails console
/home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? mysql2 is not part of the bundle. Add it to your Gemfile. (LoadError)
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/mysql2_adapter.rb:6:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1052:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_handling.rb:51:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/railtie.rb:201:in `block (2 levels) in <class:Railtie>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:327:in `<module:ActiveRecord>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:27:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:370:in `active_record_configured?'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:287:in `disconnect_database'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:111:in `preload'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
ubuntu:~/environment/sample_app (sign-up) $ rails console
/home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? mysql2 is not part of the bundle. Add it to your Gemfile. (LoadError)
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/mysql2_adapter.rb:6:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1052:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_handling.rb:51:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/railtie.rb:201:in `block (2 levels) in <class:Railtie>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:327:in `<module:ActiveRecord>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:27:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:370:in `active_record_configured?'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:287:in `disconnect_database'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:111:in `preload'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
UPDATE
this is what my gemfile looks like currently.
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '6.0.3.1'
gem 'mysql2', '~> 0.3.20'
gem 'image_processing', '1.9.3'
gem 'mini_magick', '4.9.5'
gem 'active_storage_validations', '0.8.9'
gem 'bcrypt', '3.1.13'
gem 'faker', '2.11.0'
gem 'will_paginate', '3.3.0'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.4.1'
gem 'puma', '4.3.5'
gem 'sass-rails', '6.0.0'
gem 'webpacker', '4.2.2'
gem 'turbolinks', '5.2.1'
gem 'jbuilder', '2.10.0'
gem 'bootsnap', '1.4.6', require: false
group :development, :test do
gem 'sqlite3', '1.4.2'
gem 'byebug', '11.1.3', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '4.0.2'
gem 'listen', '3.2.1'
gem 'spring', '2.1.0'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'capybara', '3.32.2'
gem 'selenium-webdriver', '3.142.7'
gem 'webdrivers', '4.3.0'
gem 'rails-controller-testing', '1.0.4'
gem 'minitest', '5.11.3'
gem 'minitest-reporters', '1.3.8'
gem 'guard', '2.16.2'
gem 'guard-minitest', '2.4.6'
end
group :production do
gem 'pg', '1.2.3'
gem 'aws-sdk-s3', '1.46.0', require: false
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# Uncomment the following line if you're running Rails
# on a native Windows system:
# gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I tried the suggestions given, but now my error looks like this when I try to run 'rails console'. Bundle install works fine.
ubuntu:~/environment/sample_app (sign-up) $ rails console
/home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem': Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? can't activate mysql2 (>= 0.4.4), already activated mysql2-0.3.21. Make sure all dependencies are added to Gemfile. (LoadError)
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/mysql2_adapter.rb:6:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1052:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/connection_handling.rb:51:in `establish_connection'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/railtie.rb:201:in `block (2 levels) in <class:Railtie>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `class_eval'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:327:in `<module:ActiveRecord>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.3.1/lib/active_record/base.rb:27:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:370:in `active_record_configured?'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:287:in `disconnect_database'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:111:in `preload'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/ubuntu/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'

Ensure ‘mysql2’ is included in your gem file and run bundle install
The key part of the error message is:
Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? mysql2 is not part of the bundle. Add it to your Gemfile.

Related

Error when im trying to run rails c and rails s with bootsnap

I'm starting at rails, and when I try to run rails c and rails s it gets me an error for require. The day before this was working just fine. My rspec is working.
I've already tried to remove bootsnap but didn'twork.
My Gemfile:
ruby '2.4.3'
gem 'rails', '~> 5.2.3'
gem 'sqlite3'
gem 'puma', '~> 3.11'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'sprockets-rails', '~> 3.0.4'
gem 'materialize-sass', '~> 1.0.0'
gem 'devise'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'rspec-rails', '~> 3.8'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'factory_bot_rails'
gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
end
group :test do
gem 'shoulda-matchers'
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
The error:
/home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
`require': cannot load such file -- rails_helper (LoadError)
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
`block in require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in
`register'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-
1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:40:in `rescue in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:26:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/norton/workspace/IotNotificationManager/spec/factories/devices.rb:1:in `<main>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:20:in `block (2 levels) in find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `block in find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `find_definitions'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot-5.0.2/lib/factory_bot/reload.rb:6:in `reload'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:25:in `block in build_reloader'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/evented_file_update_checker.rb:83:in `execute'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:35:in `block in register_reloader'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:426:in `instance_exec'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:426:in `block in make_lambda'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:605:in `catch'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:605:in `block in default_terminator'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:199:in `block in halting'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `block in invoke_before'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:513:in `invoke_before'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:131:in `run_callbacks'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/reloader.rb:89:in `prepare!'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
from /home/norton/workspace/IotNotificationManager/config/environment.rb:5:in `<main>'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:102:in `preload'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /home/norton/.rvm/gems/ruby-2.4.3/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/norton/.rvm/rubies/ruby-2.4.3/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'

problem with migrating database on heroku

I got an error when migrating my database on heroku for my new rails app
here's the error I got
rails aborted!
Gem::LoadError: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile.
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:950:in `establish_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_handling.rb:60:in `establish_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/base.rb:27:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/app/models/shop.rb:1:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:374:in `block in require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `load_interlock'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:352:in `require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:46:in `block in require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:45:in `require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:506:in `load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:193:in `const_missing'
/app/config/initializers/shopify_app.rb:9:in `block in <main>'
/app/vendor/bundle/ruby/2.5.0/gems/shopify_app-8.3.2/lib/shopify_app/configuration.rb:71:in `configure'
/app/config/initializers/shopify_app.rb:1:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:657:in `block in load_config_initializer'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:170:in `instrument'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:656:in `load_config_initializer'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:613:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:613:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
/app/config/environment.rb:7:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:337:in `require_environment!'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:48:in `invoke'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/bin/rails:11:in `<main>'
Caused by:
Gem::LoadError: sqlite3 is not part of the bundle. Add it to your Gemfile.
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:950:in `establish_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/connection_handling.rb:60:in `establish_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/base.rb:27:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/app/models/shop.rb:1:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:374:in `block in require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:37:in `load_interlock'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:352:in `require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:46:in `block in require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:45:in `require_or_load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:506:in `load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `block in load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/active_support.rb:57:in `load_missing_constant'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:193:in `const_missing'
/app/config/initializers/shopify_app.rb:9:in `block in <main>'
/app/vendor/bundle/ruby/2.5.0/gems/shopify_app-8.3.2/lib/shopify_app/configuration.rb:71:in `configure'
/app/config/initializers/shopify_app.rb:1:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:657:in `block in load_config_initializer'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/notifications.rb:170:in `instrument'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:656:in `load_config_initializer'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:613:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:613:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
/app/config/environment.rb:7:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:337:in `require_environment!'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:48:in `invoke'
/app/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<main>'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/app/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/app/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/app/bin/rails:11:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
knowing that I'm still beginner with Rails, and to get sqlite3 work with heroku I have to move it inside of development and test group inside my gemfile.
and here's my gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Rails Engine for building Shopify Apps.
gem 'shopify_app'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
group :production do
gem 'pg'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
knowing that I'm still beginner with Rails, and to get sqlite3 work with heroku I have to move it inside of development and test group inside my gemfile.
It happened to me when i started with heroku and rails. I think the problem is that you deployed your app before putting the pg gem in production group and now for some reason even if added the gem you still having the problem.
Possible solution:
Delete your Gemfile.lock and run
bundle install --without=production
Delete the app you deployed on heroku and deploy a new one with the new gemfile.lock.
My solution:
I deleted my rails app and created new one, it wasn't a problem since i was just starting the project but i learned that you have to configure your gemfile and your app in general before starting to code and deploy, this is the correct way to go.
Check the first chapter from this tutorial for a correct configuration before deploying to heroku: https://www.railstutorial.org
You need to add pg gem for production. set heroku environment to production. sqlite3 is not supported by heroku.

No such file to load -- sendgrid-ruby (LoadError)

My rails application is working in production environment, but when I am trying to run it in the development environment its giving an error:
No such file to load -- sendgrid-ruby (LoadError)
/Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- sendgrid-ruby (LoadError)
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:312:in `depend_on'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:225:in `require_dependency'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:443:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:443:in `block in eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:441:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/engine.rb:441:in `eager_load!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/adityashukla/Downloads/sprint4/config/environment.rb:5:in `<top (required)>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `require'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:251:in `require'
from /Users/adityashukla/Downloads/sprint4/config.ru:3:in `block in <main>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/adityashukla/Downloads/sprint4/config.ru:in `new'
from /Users/adityashukla/Downloads/sprint4/config.ru:in `<main>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands/server.rb:46:in `app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands/server.rb:70:in `start'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:50:in `tap'
from /Users/adityashukla/.rvm/gems/ruby-1.9.3-p551-install/gems/railties-3.2.16/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
My Gemfile :
source 'http://rubygems.org'
gem 'rails', '3.2.16'
gem 'mysql2', '~> 0.3.17'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'compass-rails'
gem 'therubyracer', :require => 'v8'
end
gem 'sendgrid_ruby', '~> 0.0.6'
gem 'mailgun', '~> 0.8', require: 'mailgun'
gem 'net-ssh', '~> 2.9', '>= 2.9.2'
gem 'jquery-rails'
Here is my application controller.rb file
class ApplicationController < ActionController::Base
require 'mailgun'
require 'sendgrid-ruby'
Kindly help, Thanks in advance.
Your Gemfile specified gem sendgrid_ruby, but the gem name according to https://github.com/sendgrid/sendgrid-ruby/blob/master/sendgrid-ruby.gemspec is sendgrid-ruby (that is, with a hyphen, not an underscore).
Could this be the problem? Maybe try changing the Gemfile's entry to sendgrid-ruby?
I just tried gem installing both -- they both install different gems.
I don't know why it worked in the production environment. Is it a different machine or Ruby version?

Rails server returning error with Gemfile

When I run my rails server on Terminal, I get the following message:
Exiting
/Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
from /Users/Rushal-Marketing/Desktop/pinter/app/models/install.rb:4:in `<class:Install>'
from /Users/Rushal-Marketing/Desktop/pinter/app/models/install.rb:1:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:566:in `get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:291:in `get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:81:in `to'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:76:in `modules'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:93:in `routes'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:70:in `initialize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:325:in `new'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:325:in `add_mapping'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:238:in `block in devise_for'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:237:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:237:in `devise_for'
from /Users/Rushal-Marketing/Desktop/pinter/config/routes.rb:4:in `block in <top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `instance_exec'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `eval_block'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:412:in `draw'
from /Users/Rushal-Marketing/Desktop/pinter/config/routes.rb:1:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /Users/Rushal-Marketing/Desktop/pinter/config/environment.rb:5:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:3:in `block in <main>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:in `new'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:in `<main>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/Rushal-Marketing/Desktop/pinter/bin/rails:9:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/bin/rails:9:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/command.rb:7:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client.rb:28:in `run'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/bin/spring:51:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Here is my Gemfile:
source 'https://rubygems.org'
ruby '2.2.1'
gem 'rails', '~> 4.2.5'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'devise', '~> 3.5.3'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
gem 'bootstrap-sass'
Any assistance with this would be much appreciated! Thanks!
You need to run the command
rails generate devise:install
You need to do it in your console
bundle install
Then
bundle exec rails generate devise:install
bundle exec rails generate device model_name
in your case model_name might be Install
First you have to bundle your gems:
bundle install
Then you have to install devise:
rails g devise:install
And then you have to restart the rails server:
Ctrl + C
$ rails s

Error when starting my rails server: Circular dependency detected while autoloading constant AdminUser (RuntimeError)

I have this problem, which is when i try to start to start the rails server i get this:
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant AdminUser (RuntimeError)
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/Desktop/BackyardCoding/app/admin/admin_user.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:566:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:302:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:80:in `to'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:75:in `modules'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:92:in `routes'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:69:in `initialize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `new'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `add_mapping'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:3:in `block in <top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `eval_block'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:in `draw'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /Users/ludvigsorensen/Desktop/backyardcoding/config/environment.rb:5:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:3:in `block in <main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `new'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `<main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `require'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/command.rb:7:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client.rb:28:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/bin/spring:49:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I think this might be related to active_admin btw here is my gem file.....
source 'https://rubygems.org'
gem 'bootstrap-sass', '~> 3.3.5.1'
gem 'devise', '~> 3.4.1'
gem 'toastr-rails'
gem 'activeadmin', github: 'activeadmin'
gem 'paperclip', '~> 4.2.1'
gem 'friendly_id', '~> 5.1.0'
gem 'active_admin-sortable_tree', '~> 0.2.1'
gem 'kaminari', '~> 0.16.3'
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'mandrill-api', '1.0.52', require: 'mandrill'
gem 'redcarpet', '~> 3.2.3'
gem 'coderay', '~> 1.1.0'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end
Do you know what i should do?
So i just fixed it myself. This answer helped me out: https://github.com/activeadmin/activeadmin/issues/2334#issuecomment-42626409
I just had to rename my models inside the app/admin directory to plural, fx with admin_user.rb. I renamed app/admin/admin_user.rb to app/admin/admin_users.rb, and then renamed the other files to plural as well.

Resources