Im trying to give effects to specific items with specific tags

i have this line in my tick.json effect give @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:diamond",tag:{ruby:1b}}]}] minecraft:fire_resistance 1 1 true that should give me fire resistance when i have a daimond with the ruby tag in my offhand In game i do this command: /give @s minecraft:diamond[minecraft:custom_data={ruby:1b}] and then put that diamond into my offhand, however i do not get the effect please help me
Continue to help post