Project

General

Profile

I18n error (I18n::ArgumentError in Welcome#index)

Added by Alexey Kiryanov over 14 years ago

As I run the application I get this error:

 I18n::ArgumentError in Welcome#index

Showing app/views/welcome/index.rhtml where line #1 raised:

Object must be a Date, DateTime or Time object. :label_home given.

Extracted source (around line #1):

1: <h2><%= l(:label_home) %></h2>
2: 
3: <div class="splitcontentleft">
4:   <%= textilizable Setting.welcome_text %>

It seams like I'm just a few steps away from success, but I don't know what to do.
As far as I know I18n.l() must take date/time as an argument, but from the context it's clear that it's not what developers wanted to do here.
What should I do? Did anyone got that problem before?

Redmine - 0.9.4
Ruby - 1.8.7
Rails - 2.6.5
Rack - 1.0.1
Rake - 0.8.7
Url - hrrp://redmine.aleki.ru

-----
I'm sorry for duplicating, but since the topic of the first message were problems with installation, i thought it's appropriate to make a new topic.
-----
please, bear with my English - I'm from Russia.


Replies (8)

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Felix Schäfer over 14 years ago

Are you trying to serve the app through passenger or fcgi?

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Alexey Kiryanov over 14 years ago

I use hosting service to host redmine (monsterhost), so I'm not really sure, but judging from the framework trace - fcgi.
If there is a way I can know for sure, please, tell me.

last fragment of the framework trace:

 ...
/home1/olkiinfo/ruby/app_redmine/vendor/rails/railties/lib/fcgi_handler.rb:51:in `process!'
/home1/olkiinfo/ruby/app_redmine/vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
dispatch.fcgi:24

-------
p.s. correct url: http://redmine.aleki.ru

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Felix Schäfer over 14 years ago

Mmh, just had a look and I can't really find any docs on their page. Just the hugest hunch/guess: try renaming the redmine_dir/public/.htaccess file to something else, because I can remember it interfering with passenger, so if they use passenger it should work without it (make sure to reload your apache instance though for the change to be noticed). If it doesn't work, please post a link to the guide you followed to get a rails app installed on their shared hosts.

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Alexey Kiryanov over 14 years ago

Well, I used at least three guides and messed a lot with cPanel.
Renamed .htaccess - it just shows me a folder index.

To be sure, I did everything once again, using these guides:

http://www.publictraffic.megazulu.com/?p=14
http://hibiscustech.com/blog/2009/07/29/ruby-on-rails-and-hostmonster/

And I got completely different results (since I didn't mess with cPanel's Ruby on rails). I've got 500 error .
AND I was able to run webrick, but I have absolutely no Idea what address should I connect to. (also, I don't know how to shut down daemon =_=).
Renamed .htaccess - it just shows me a folder index.

So, I also tried to do everything with JUST cPanel's Ruby on rails... but I failed there too:

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Felix Schäfer over 14 years ago

I'm really sorry but I won't be able to help you untangle this. Try to get redmine running with webrick (you call that one with script/server and some options in the redmine directory) to make sure redmine runs ok. Then you can decide what you want to serve redmine with and stick with one guide to install it.

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Alexey Kiryanov over 14 years ago

Since it seems a bit hopeless I'll run redmine on my friend's VPS instead.

Thanks anyway!
It's very nice to how you try to help everyone.
Good job!

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Man Vuong over 14 years ago

It seems to me that the method l() of I18n class was overridden by another module or class.
Check your custom modules and plugins to ensure that the method l() was not overridden.
Another reason may be the include Redmine::I18n command was declared outside a module or class.
Example:

include Redmine::I18n # => CAUSE ERROR I18n::ArgumentError
class MyClass
...
end

  1. CORRECT

class MyClass
include Redmine::I18n
end

Best regards!

RE: I18n error (I18n::ArgumentError in Welcome#index) - Added by Man Vuong over 14 years ago

Sorry, here is the correct example:

*include Redmine::I18n* # => CAUSE ERROR I18n::ArgumentError
class MyClass 
 ... 
end

To correct it:

class MyClass 
 include Redmine::I18n
end

    (1-8/8)