Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Rails 4 compatibility #42

terraplane opened this Issue · 14 comments

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


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 ?


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 ??


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


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.




Error still persists in Rails 4.0.2.

@GSI GSI referenced this issue from a commit in GSI/rails-translate-routes_reproduce_issue-42
GSI2014 reproduced error with 'rails-translate-route' as outlined in francesc… 877e6d5

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 referenced this issue from a commit in hugopeixoto/rails-translate-routes
@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.


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.