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

Specs fail against Ruby 3.4 [PR attached] #535

Open
tagliala opened this issue Dec 27, 2024 · 0 comments · May be fixed by #537
Open

Specs fail against Ruby 3.4 [PR attached] #535

tagliala opened this issue Dec 27, 2024 · 0 comments · May be fixed by #537
Labels

Comments

@tagliala
Copy link
Contributor

tagliala commented Dec 27, 2024

Looks like in 3.4 append_javascript_pack_tag is being prefixed by Shakapacker::Helper

  1) Shakapacker::Helper #append_javascript_pack_tag raises an error if called after calling #javascript_pack_tag
     Failure/Error:
       expect {
         javascript_pack_tag("application")
         append_javascript_pack_tag("bootstrap", defer: false)
       }.to raise_error(expected_error_message)
     
       expected Exception with "You can only call append_javascript_pack_tag before javascript_pack_tag helper. Please refer to http..._javascript_pack_tag-prepend_javascript_pack_tag-and-append_stylesheet_pack_tag for the usage guide",
            got #<RuntimeError: You can only call Shakapacker::Helper#append_javascript_pack_tag before javascript_pa..._javascript_pack_tag-prepend_javascript_pack_tag-and-append_stylesheet_pack_tag for the usage guide> with backtrace:
         # ./lib/shakapacker/helper.rb:198:in 'Shakapacker::Helper#update_javascript_pack_tag_queue'
         # ./lib/shakapacker/helper.rb:183:in 'Shakapacker::Helper#append_javascript_pack_tag'
         # ./spec/shakapacker/helper_spec.rb:133:in 'block (3 levels) in <module:Behavior>'
         # ./spec/shakapacker/helper_spec.rb:134:in 'block (2 levels) in <module:Behavior>'
@tagliala tagliala added the bug label Dec 27, 2024
tagliala added a commit to tagliala/shakapacker that referenced this issue Dec 27, 2024
Caller location with `label` is being decorated with
`Shakapacker::Helper#` in Ruby 3.4

This commit changes `label` to `base_label`

Close shakacode#535
tagliala added a commit to tagliala/shakapacker that referenced this issue Dec 27, 2024
Caller location with `label` is being decorated with
`Shakapacker::Helper#` in Ruby 3.4

This commit changes `label` to `base_label`

Close shakacode#535

Ref:
- https://ruby-doc.org/core-2.7.0/Thread/Backtrace/Location.html#method-i-base_label
@tagliala tagliala linked a pull request Dec 27, 2024 that will close this issue
1 task
@tagliala tagliala changed the title Specs fail against Ruby 3.4 [PR in progress] Specs fail against Ruby 3.4 [PR attached] Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant