rails / jbuilder

Jbuilder: generate JSON objects with a Builder-style DSL
MIT License
4.34k stars 440 forks source link

Ruby on Rails 6.1 support #500

Closed voxik closed 3 years ago

voxik commented 3 years ago

The test suite fails running against Ruby on Rails 6.1 as I mentioned in #499

https://travis-ci.org/github/rails/jbuilder/jobs/758346266

The test fails such as:

ActionView::MissingTemplate: Missing template /source.json.jbuilder with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :xml, :json], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder]}. Searched in:
  * "_partial.json.jbuilder, _post.json.jbuilder, racers/_racer.json.jbuilder, _collection.json.jbuilder, _post.html.erb, source.json.jbuilder"
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/path_set.rb:48:in `find'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/lookup_context.rb:127:in `find'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/renderer/template_renderer.rb:45:in `determine_template'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/renderer/template_renderer.rb:7:in `render'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/renderer/renderer.rb:22:in `render'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/helpers/rendering_helper.rb:38:in `block in render'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/base.rb:273:in `in_rendering_context'
    /home/travis/build/rails/jbuilder/gemfiles/vendor/bundle/ruby/2.7.0/bundler/gems/rails-06e8d5c29fa9/actionview/lib/action_view/helpers/rendering_helper.rb:34:in `render'
    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:293:in `render_without_parsing'
    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:288:in `render'
    /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:267:in `block in <class:JbuilderTemplateTest>'
rails test home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:261
DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: source.json.jbuilder (called from render_without_parsing at /home/travis/build/rails/jbuilder/test/jbuilder_template_test.rb:293)
E

Not sure if the deprecation is related.

voxik commented 3 years ago

It seems that the change happened between:

Last working

https://travis-ci.org/github/rails/jbuilder/jobs/668148602 Using actionview 6.1.0.alpha from git://github.com/rails/rails.git (at master@f085e54)

First failing

https://travis-ci.org/github/rails/jbuilder/jobs/726560897 Using actionview 6.1.0.alpha from git://github.com/rails/rails.git (at master@99a0254)

kriansa commented 3 years ago

@voxik does #502 fix it?

voxik commented 3 years ago

@voxik does #502 fix it?

Yes, I think so. I have even applied the 993fbc76c3e80037b33fdee05abe5c58d4a64482 to the Fedora and probably forgot about this.