rails: rails 7 rc1 method_missing: undefined method `assets'
Steps to reproduce
Update gem from rails 7.0.0.alpha2 to gem “rails”, “~> 7.0.0.rc1” bundle update / bundle install bin/dev
development.rb with config.assets.quiet = true
Expected behavior
Run properly for rails 7 rc1
Actual behavior
20:36:08 web.1 | /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/railtie/configuration.rb:96:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00007fe8a2410b30 @root=#<Pathname:/Users/ryanjeffbrual/gorails/doctor_app>, @generators=#<Rails::Configuration::Generators:0x00007fe8d219e098 @aliases={}, @options={:rails=>{:orm=>:active_record, :test_framework=>:test_unit, :integration_tool=>:test_unit, :system_tests=>:test_unit}, :active_record=>{:migration=>true, :timestamps=>true}, :test_unit=>{:fixture=>true, :fixture_replacement=>nil}}, @fallbacks={}, @templates=[], @colorize_logging=true, @api_only=false, @hidden_namespaces=[], @after_generate_callbacks=[]>, @middleware=#<Rails::Configuration::MiddlewareStackProxy:0x00007fe8a24105b8 @operations=[], @delete_operations=[]>, @javascript_path="javascript", @encoding=#<Encoding:UTF-8>, @allow_concurrency=nil, @consider_all_requests_local=true, @filter_parameters=[], @filter_redirect=[], @helpers_paths=[], @hosts=[".localhost", #<IPAddr: IPv4:0.0.0.0/0.0.0.0>, #<IPAddr: IPv6:0000:0000:0000:0000:0000:0000:0000:0000/0000:0000:0000:0000:0000:0000:0000:0000>], @host_authorization={}, @public_file_server=#<ActiveSupport::OrderedOptions {:enabled=>true, :index_name=>"index"}>, @force_ssl=false, @ssl_options={:hsts=>{:subdomains=>true}}, @session_store=nil, @time_zone="UTC", @beginning_of_week=:monday, @log_level=:debug, @cache_store=:null_store, @railties_order=[:all], @relative_url_root=nil, @reload_classes_only_on_change=true, @file_watcher=ActiveSupport::FileUpdateChecker, @exceptions_app=nil, @autoflush_log=true, @log_formatter=#<ActiveSupport::Logger::SimpleFormatter:0x00007fe8d249f008 @datetime_format=nil>, @eager_load=false, @secret_key_base=nil, @api_only=false, @debug_exception_response_format=nil, @x=#<Rails::Application::Configuration::Custom:0x00007fe8d249ef68 @configurations={}>, @enable_dependency_loading=false, @read_encrypted_secrets=false, @content_security_policy=nil, @content_security_policy_report_only=false, @content_security_policy_nonce_generator=nil, @content_security_policy_nonce_directives=nil, @require_master_key=false, @loaded_config_version=7.0, @credentials=#<ActiveSupport::OrderedOptions {:content_path=>#<Pathname:/Users/ryanjeffbrual/gorails/doctor_app/config/credentials.yml.enc>, :key_path=>#<Pathname:/Users/ryanjeffbrual/gorails/doctor_app/config/master.key>}>, @disable_sandbox=false, @add_autoload_paths_to_load_path=true, @permissions_policy=nil, @rake_eager_load=false, @server_timing=false, @paths=#<Rails::Paths::Root:0x00007fe8d24a7910 @path=#<Pathname:/Users/ryanjeffbrual/gorails/doctor_app>, @root={"app"=>#<Rails::Paths::Path:0x00007fe8d24a7730 @paths=["app"], @current="app", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="{*,*/concerns}", @exclude=["assets", "javascript"], @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/assets"=>#<Rails::Paths::Path:0x00007fe8d24a75c8 @paths=["app/assets"], @current="app/assets", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="*", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "app/controllers"=>#<Rails::Paths::Path:0x00007fe8d24a7500 @paths=["app/controllers"], @current="app/controllers", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/channels"=>#<Rails::Paths::Path:0x00007fe8d24a7460 @paths=["app/channels"], @current="app/channels", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/helpers"=>#<Rails::Paths::Path:0x00007fe8d24a73c0 @paths=["app/helpers"], @current="app/helpers", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/models"=>#<Rails::Paths::Path:0x00007fe8d24a7320 @paths=["app/models"], @current="app/models", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/mailers"=>#<Rails::Paths::Path:0x00007fe8d24a7280 @paths=["app/mailers"], @current="app/mailers", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=true, @autoload=false, @load_path=false>, "app/views"=>#<Rails::Paths::Path:0x00007fe8d24a71e0 @paths=["app/views"], @current="app/views", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "lib"=>#<Rails::Paths::Path:0x00007fe8d24a7140 @paths=["lib"], @current="lib", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=true>, "lib/assets"=>#<Rails::Paths::Path:0x00007fe8d24a7078 @paths=["lib/assets"], @current="lib/assets", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="*", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "lib/tasks"=>#<Rails::Paths::Path:0x00007fe8d24a6fd8 @paths=["lib/tasks"], @current="lib/tasks", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="**/*.rake", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config"=>#<Rails::Paths::Path:0x00007fe8d24a6f60 @paths=["config"], @current="config", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/environments"=>#<Rails::Paths::Path:0x00007fe8d24a6e48 @paths=["config/environments"], @current="config/environments", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="development.rb", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/initializers"=>#<Rails::Paths::Path:0x00007fe8d24a6da8 @paths=["config/initializers"], @current="config/initializers", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="**/*.rb", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/locales"=>#<Rails::Paths::Path:0x00007fe8d24a6d08 @paths=["config/locales"], @current="config/locales", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="**/*.{rb,yml}", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/routes.rb"=>#<Rails::Paths::Path:0x00007fe8d24a6c90 @paths=["config/routes.rb"], @current="config/routes.rb", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/routes"=>#<Rails::Paths::Path:0x00007fe8d24a6bf0 @paths=["config/routes"], @current="config/routes", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="**/*.rb", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "db"=>#<Rails::Paths::Path:0x00007fe8d24a6b78 @paths=["db"], @current="db", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "db/migrate"=>#<Rails::Paths::Path:0x00007fe8d24a6b00 @paths=["db/migrate"], @current="db/migrate", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "db/seeds.rb"=>#<Rails::Paths::Path:0x00007fe8d24a6a88 @paths=["db/seeds.rb"], @current="db/seeds.rb", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "vendor"=>#<Rails::Paths::Path:0x00007fe8d24a69e8 @paths=["vendor"], @current="vendor", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=true>, "vendor/assets"=>#<Rails::Paths::Path:0x00007fe8d24a6948 @paths=["vendor/assets"], @current="vendor/assets", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="*", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/database"=>#<Rails::Paths::Path:0x00007fe8d24a68a8 @paths=["config/database.yml"], @current="config/database", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/secrets"=>#<Rails::Paths::Path:0x00007fe8d24a6808 @paths=["config"], @current="config/secrets", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob="secrets.yml{,.enc}", @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "config/environment"=>#<Rails::Paths::Path:0x00007fe8d24a6768 @paths=["config/environment.rb"], @current="config/environment", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "lib/templates"=>#<Rails::Paths::Path:0x00007fe8d24a66f0 @paths=["lib/templates"], @current="lib/templates", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "log"=>#<Rails::Paths::Path:0x00007fe8d24a6600 @paths=["log/development.log"], @current="log", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "public"=>#<Rails::Paths::Path:0x00007fe8d24a6588 @paths=["public"], @current="public", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "public/javascripts"=>#<Rails::Paths::Path:0x00007fe8d24a6510 @paths=["public/javascripts"], @current="public/javascripts", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "public/stylesheets"=>#<Rails::Paths::Path:0x00007fe8d24a6498 @paths=["public/stylesheets"], @current="public/stylesheets", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>, "tmp"=>#<Rails::Paths::Path:0x00007fe8d24a6420 @paths=["tmp"], @current="tmp", @root=#<Rails::Paths::Root:0x00007fe8d24a7910 ...>, @glob=nil, @exclude=nil, @autoload_once=false, @eager_load=false, @autoload=false, @load_path=false>}>, @autoload_paths=["/Users/ryanjeffbrual/gorails/doctor_app/app/madmin/resources", "/Users/ryanjeffbrual/gorails/doctor_app/app/madmin/fields"], @cache_classes=false> (NoMethodError)
20:36:08 web.1 | Did you mean? asset_host
20:36:08 web.1 | from /Users/ryanjeffbrual/gorails/doctor_app/config/environments/development.rb:58:in `block in <main>'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/railtie.rb:251:in `instance_eval'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/railtie.rb:251:in `configure'
20:36:08 web.1 | from /Users/ryanjeffbrual/gorails/doctor_app/config/environments/development.rb:3:in `<main>'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/engine.rb:562:in `block (2 levels) in <class:Engine>'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/engine.rb:561:in `each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/engine.rb:561:in `block in <class:Engine>'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:32:in `instance_exec'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:32:in `run'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:61:in `block in run_initializers'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:50:in `each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:50:in `tsort_each_child'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:415:in `call'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `call'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/initializable.rb:60:in `run_initializers'
20:36:08 web.1 | from /Users/ryanjeffbrual/.rvm/gems/ruby-3.0.1/gems/railties-7.0.0.rc1/lib/rails/application.rb:369:in `initialize!'
System configuration
rails", "~> 7.0.0.rc1:
Ruby version 3.0.1:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Use sprockets for assets Fixes > undefined method `assets' for > #<Rails::Application::Configuration:0x000000010705c910 See https://github.com/rails/rails/issues/43793 — committed to substancelab/rails-boilerplate by koppen 2 years ago
- Use sprockets for assets Fixes > undefined method `assets' for > #<Rails::Application::Configuration:0x000000010705c910 See https://github.com/rails/rails/issues/43793 — committed to substancelab/rails-boilerplate by koppen 2 years ago
- Use sprockets for assets Fixes > undefined method `assets' for > #<Rails::Application::Configuration:0x000000010705c910 See https://github.com/rails/rails/issues/43793 — committed to substancelab/rails-boilerplate by koppen 2 years ago
Thank you for the issue. You need to add
sprockets-rails
in your Gemfile since it is not a dependency of Rails anymore.Even with jsbundling-rails or cssbundling-rails you need sprockets to be able to serve those assets. So you need to either add
sprockets-rails
to your app or usepropshaft
instead ofsprockets-rails
.