Closed MuneebSarfraz94 closed 4 years ago
@MuneebSarfraz94 Hmm. What's your Rails version?
rails v 3.2.13. I had to downgrade gem version to fix the issue. i tried every downgraded version till 0.5.0 but issue existed. Fixed at version 0.5.0.
Thanks, but the issue couldn't be reproduced on my side. Could you post a minimum routes.rb that reproduces the error?
The ActionDispatch::Routing::PathRedirect
class was added to Rails in 4.0; see https://github.com/rails/rails/commit/ec774983514d4ce1b593585ae14a17b730ee2c46 and https://apidock.com/rails/v4.0.2/ActionDispatch/Routing/PathRedirect.
In our case, we're using a custom constraint like the one described here: https://guides.rubyonrails.org/v3.2.13/routing.html#advanced-constraints; I suspect that's part of the cause, though I haven't been able to build a failing test case yet.
@MuneebSarfraz94 @irvingreid Thank you for the hints! I guess I fixed this issue via e4b45c3e665a3403e65ebe15155898f8c5dfd8c6.
I'm not sure if I'd say we're still supporting Rails 3 though. I wrote this patch not because we still support Rails 3 but just because I could write the patch for this particular case.
If you're really maintaining an application on that legacy Rails, I recommend you to migrate to a newer supported version as soon as possible.
Just made a version 0.8.1 release with a fix for this issue. HTH
Thanks, that's great! I'm looking to use this gem as part of a "migrate off rails3" project :-)
Sounds great! Good luck on your project :)
When i run rake traceroute command in my application i get this error. ruby 2.1.10 NameError: uninitialized constant ActionDispatch::Routing::PathRedirect