-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hello All,
I am new to using JR and pundit, so I have been trying to use pundit-resources with the hope to make my life easier. However, I have been running into a error like:
==> log/sidekiq-stderr-supervisor.log <==
/api/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require': /mnt/storage1/home/nadari/red-wing/api/rails/vendor/bundle/ruby
/2.2.0/gems/pundit-resources-1.0.1/lib/pundit/resource.rb:17: syntax error, unexpected '.' (SyntaxError)
context[:policy_used]&.call
^
/api/rails/vendor/bundle/ruby/2.2.0/gems/pundit-resources-1.0.1/lib/pundit/resource.rb:35: syntax error, unexpected '.'
context[:policy_used]&.call
^
etc etc.
After some digging, It turns out that the safe navigation operator &. was added to ruby in 2.3, but I am using ruby 2.2 and I am not able to upgrade.
I think this should be either fixed to be compatible with 2.2 or at least have ruby 2.3 as a requirement and maybe mentioned in the documentation/readme.
I have tried using older versions of this Gem but it seems that all versions after 1.0.0 have this added to it, and 1.0.0 requires rails 5.0.0 for some reason!
Please let me know if I can do anything to help resolve this issue, and thank you all for your hard work on this gem :)