Skip to content

Rails 4 compatibility #42

terraplane opened this Issue Mar 7, 2013 · 14 comments

Looks like the gem doesnt work. Routes were translated but _path helpers doesnt work.

Padchi commented May 22, 2013

Someone who has come up with a solution for this?


This is a big problem, here meet dont work whit Rails 4, someone have solution ?

erwin16 commented Aug 5, 2013

same issue... actually too bad , cannot upgrade any of y Rails 3 apps... all using translated routes ...
any idea where we should look at in the code ??

erwin16 commented Sep 11, 2013

found a way to make it running w Rails 4, using send...
I changed all my path urls
portofolio_path( Portfolio.find_by_name('ceramics') )
to :
send("portfolio_#{I18n.locale}_path", Portfolio.find_by_name('ceramics')
obvioulsy I did it because I need to upgrade an existing app.... I'll try to avoid this gem in future localized apps



Is this gem still supported?

GSI commented Oct 6, 2013


Note that I am trying to migrate to route_translator ( It seems to work in production, but in test any _path or _url calls without explicit language code also cause NoMethodError: undefined method 'foo_path' ...

I'll keep you updated.



jdurand commented Dec 3, 2013




GSI commented Jan 22, 2014

Error still persists in Rails 4.0.2.

@GSI GSI pushed a commit to GSI/rails-translate-routes_reproduce_issue-42 that referenced this issue Jan 26, 2014
GSI2014 reproduced error with 'rails-translate-route' as outlined in francesc… 877e6d5
GSI commented Jan 26, 2014

I published a Rails 4.0.2 project that reproduces the error:

When you check it out and run "rake test", you should see the same error as shown in the README.

When removing the line starting with "ActionDispatch::Routing::Translator" from config/routes.rb, the "rake test" command succeeds.

@hugopeixoto hugopeixoto added a commit to hugopeixoto/rails-translate-routes that referenced this issue Feb 23, 2014
@hugopeixoto hugopeixoto Attempt at fixing francesc#42 e1f85f4

I attempted to solve the problem.
The helpers are still not accessible from the tests, but they should be accessible from controllers and views. Hopefully this is enough.

Can someone check if it works, of if I broke something else?

By the way, using my patch, I can successfully use the helpers in tests using:
I will try to see if it is easy to fix that too.

GSI commented Feb 24, 2014

Note that @pebiantara ( solved the problem, but Rails 3 compatibility was lost in the process.

Sorry for being late providing that info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.