Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when excluding asset paths in application.rb #2464

Open
benjichen16 opened this issue Nov 30, 2023 · 0 comments
Open

Error when excluding asset paths in application.rb #2464

benjichen16 opened this issue Nov 30, 2023 · 0 comments
Labels
bug breakages in functionality that is implemented

Comments

@benjichen16
Copy link

What were you trying to do?

Was trying to install the administrate gem and run the rails generate administrate:install command to generate some views.

What did you end up with (logs, or, even better, example apps are great!)?

Here is an example application I created:
https://github.com/benjichen16/erroring_app_for_administrate_gem

Inside this app, we have the default rails application and the administrate gem. In the second commit of this repo, I added this line:

config.assets.excluded_paths << "app/assets/application.css"

Which will cause the application to error out with these logs:

$ rails generate administrate:install
/example_app/config/application.rb:21:in `<class:Application>': undefined method `<<' for nil:NilClass (NoMethodError)

    config.assets.excluded_paths << "app/assets/stylesheets/tailwind.css"
                                 ^^
	from example_app/config/application.rb:10:in `<module:ExampleApp>'
	from example_app/config/application.rb:9:in `<main>'
	from </ruby-3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from </ruby-3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'

I believe this is related to this issue:
#2091

What versions are you running?

  • Rails: Rails 7.0.8
  • administrate: 0.19.0
@benjichen16 benjichen16 added the bug breakages in functionality that is implemented label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug breakages in functionality that is implemented
Projects
None yet
Development

No branches or pull requests

1 participant