New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `translate' for I18n:Module #132
Comments
can you run I18n.translate directly from a console within the app? |
If you can tell me, how to do it, I'm more than happy to try. I'm not a ruby developer. All I did was trying to install redmine on the same server where I already had the gollum wiki running. I had problems to make redmine work with puma due to some conflicting version of rack. So I probably messed up things when i did |
from the command line, can you open rails console ? if so, try typing I18n.translate 'whatever' |
those bold things are commands to be typed in. tried bolding them but not sure that reads any better. |
So it seems, the only command it understands is |
try script/console. you are probably on an older version of rails for this application. |
I assume you want me to go to the app directory of gollum, right? I actually think, that gollum is not a rails application at all. Have a look at the sources here: |
yeah i'm not familiar with gollum at all so can't do a whole lot other than point to some places to look. sorry my presumption this was a rails app was wrong lol. i take it your not using bundler or rvm gemsets or something like that? |
I've used bundler to install redmine. But I've not used it for gollum. All i did here was I really don't know much about ruby, so all i can do is blind guessing. What's weird, is that I also see in your code, that you have another Sorry if all this sounds dumb - just trying to wrap my head around this ruby stuff. :) |
not a problem, man. our i18n module is namespaced though so it's not the issue. has something else in that stack defined a root-level i18n on the fly before i18n normal is loaded perhaps? i have no idea. it's clearly something in the new changes but not sure how to tell you to start investigating. |
Thanks for your help. Unfortunately I'm not really sure, how i could check that. Here's the full stack trace, maybe you could have a look? https://gist.github.com/mikehaertl/6110758 You said, it may be a problem with latest changes. I think i tried that, but gollum seems to be compatible even with newer version.
|
it's not the gollum setup that's messed things up but something in changing your setup to accommodate redmine. if you use bundler you can avoid some of these cross-contaminations. the only guess i can make is that something defines the base-level module namespace I18n. stringex does not try to require it itself because that might not be what the user wants. we only check if it's [that is the module] defined. i've added some code that ensures two things.
2.0.8 gem has this functionality. try that and see the error you get. |
Yay! It works again! Thanks a lot :). FYI I did use bundler to install redmine. I'm not sure if bundler is meant to install required packages to the app directory instead of the system wide package directory. But from what i've seen i'd say, it just installs packages globally. So not sure how this helps to avoid conflicts with other app's dependencies. If you know some good introduction how to avoid conflicts with bundler i'd be happy to know. Anyway, thanks again for your help. |
be aware you may not be using i18n though. part of what that code fixed is checking that i18n is defined with a translate method. your stack seems not to. so it's defaulting to the old internal backend. this shouldn't be a big issue or anything as long as you aren't trying to use the i18n backend. |
I have a gollum wiki on my server. Since i also tried to install redmine, I now receive the following error when creating a new page in gollum:
In the stacktrace it shows, that the relevant call is in stringex:
I'm not a ruby expert, but from what i can tell, all requirements are met. Here's the output of
gem list
:Any idea, what could have caused this issue? Everything went fine before i messed around with redmine.
The text was updated successfully, but these errors were encountered: