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

Rails doesn't have 'assets' #106

Open
attenzione opened this issue Dec 29, 2023 · 1 comment
Open

Rails doesn't have 'assets' #106

attenzione opened this issue Dec 29, 2023 · 1 comment

Comments

@attenzione
Copy link

My Rails application doesn't compile assets at all, so configuration doesn't have an assets method (Sprockets not included in Rails)

@jamesst20
Copy link

jamesst20 commented Jun 19, 2024

@Roguelazer

I second this, we use ruby-vite instead of Sprockets so as soon as we start the application, it crash with this exception

web    | /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/railtie/configuration.rb:109:in `method_missing': undefined method `assets' for an instance of Rails::Application::Configuration (NoMethodError)
web    | Did you mean?  asset_host
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/rails_cloudflare_turnstile-0.2.1/lib/rails_cloudflare_turnstile/railtie.rb:12:in `block in <class:Railtie>'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `instance_exec'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:32:in `run'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:61:in `block in run_initializers'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:231:in `block in tsort_each'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:353:in `block (2 levels) in each_strongly_connected_component'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:434:in `each_strongly_connected_component_from'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:352:in `block in each_strongly_connected_component'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:350:in `each'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:350:in `call'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:350:in `each_strongly_connected_component'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:229:in `tsort_each'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/3.3.0/tsort.rb:208:in `tsort_each'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/initializable.rb:60:in `run_initializers'
web    | 	from /Users/james/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/railties-7.1.3.4/lib/rails/application.rb:426:in `initialize!'
web    | 	from /Users/james/Projects/mcc/config/environment.rb:5:in `<main>'

Maybe adding in the gemspec as a dependency could resolve the error?

Edit: I commented out the line in engine.rb and railtie.rb to allow the server to boot and it seems to work fine too at least to have the cloudflare square tell me my domain is not valid in my form

Capture d’écran, le 2024-06-19 à 09 58 49

Capture d’écran, le 2024-06-19 à 09 58 58

so I would say either add sprocket-rails as a gem depedency and require it or check for respond_to assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants