Some pages don't work

Added by David Gueye over 8 years ago

Hi,

I have a problem : I just installed Redmine on a Debian Lenny. The homepage, the login page and most of the pages work well. But some pages like the project edit form or the settings send me back an 500 error.

I really have no idea of the problem. I don't know well Redmine and Ruby

Thanks for help

Replies (10)

RE: Some pages don't work - Added by Felix Schäfer over 8 years ago

What version of redmine? From source or from the package? Have a look at the log (log/production.log), find one error trace and post it here.

RE: Some pages don't work - Added by David Gueye over 8 years ago

It's the last version of Redmine : 1.0.3; I checked out it from the repository

Here an extract of the production log file :

ActionView::TemplateError (wrong number of arguments (2 for 0)) on line #6 of app/views/settings/_authentication.rhtml:
3: <div class="box tabular settings">
4: <p><%= setting_check_box :login_required %></p>
5: 
6: <p><%= setting_select :autologin, [[l(:label_disabled), 0]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]} %></p>
7: 
8: <p><%= setting_select :self_registration, [[l(:label_disabled), "0"],
9:                                                          [l(:label_registration_activation_by_email), "1"],

    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `warn_syntax_deprecation!'
    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:158:in `interpolate_without_deprecated_syntax'
    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `gsub'
    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:153:in `interpolate_without_deprecated_syntax'
    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:46:in `translate'
    /usr/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n.rb:160:in `t'
    lib/redmine/i18n.rb:13:in `l'
    app/views/settings/_authentication.rhtml:6:in `_run_rhtml_app47views47settings47_authentication46rhtml_locals_authentication_object_tab'
    app/views/settings/_authentication.rhtml:6:in `collect'
    app/views/settings/_authentication.rhtml:6:in `_run_rhtml_app47views47settings47_authentication46rhtml_locals_authentication_object_tab'
    app/views/settings/_authentication.rhtml:1:in `_run_rhtml_app47views47settings47_authentication46rhtml_locals_authentication_object_tab'
    app/views/common/_tabs.rhtml:24:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/views/common/_tabs.rhtml:23:in `each'
    app/views/common/_tabs.rhtml:23:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/helpers/application_helper.rb:202:in `render_tabs'
    app/views/settings/edit.rhtml:3:in `_run_rhtml_app47views47settings47edit46rhtml'
    app/controllers/settings_controller.rb:25:in `index'

Rendering /home/vhosts/redmine/public/500.html (500 Internal Server Error)

RE: Some pages don't work - Added by Eric Davis over 8 years ago

I see i18n 0.4.2 there. Check out the notes in #6784

Eric Davis

RE: Some pages don't work - Added by David Gueye over 8 years ago

Thanks for help but now I think that I (also) have a problem with mongrel...

When I try :mongrel_rails mongrel::start -e production -p 8000 -c /home/vhosts/redmine -a 127.0.0.1 --user www-data --group www-data

I get this :

  • Starting Mongrel listening at 127.0.0.1:8000
  • Initiating groups for "www-data":"www-data".
  • Changing group to "www-data".
  • Changing user to "www-data".
  • Starting Rails with production environment...
    /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
    /usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 2, col 18: ` smtp_settings:' (ArgumentError)
    from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
    from /usr/lib/ruby/1.8/yaml.rb:144:in `load_file'
    from /usr/lib/ruby/1.8/yaml.rb:143:in `open'
    from /usr/lib/ruby/1.8/yaml.rb:143:in `load_file'
    from /home/vhosts/redmine/config/initializers/40-email.rb:6
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load_without_new_constant_marking'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in `load'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:622:in `load_application_initializers'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in `each'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:621:in `load_application_initializers'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:176:in `process'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
    from /home/vhosts/redmine/config/environment.rb:20
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/1.8/mongrel/rails.rb:147:in `rails'
    from /usr/bin/mongrel_rails:114:in `cloaker_'
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:149:in `call'
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:149:in `listener'
    from /usr/bin/mongrel_rails:100:in `cloaker_'
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:in `call'
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:in `initialize'
    from /usr/bin/mongrel_rails:85:in `new'
    from /usr/bin/mongrel_rails:85:in `run'
    from /usr/lib/ruby/1.8/mongrel/command.rb:212:in `run'
    from /usr/bin/mongrel_rails:282

I cannot run mongrel anymore

RE: Some pages don't work - Added by Felix Schäfer over 8 years ago

You have a syntax error in your email.yml.

RE: Some pages don't work - Added by David Gueye over 8 years ago

thanks Felix, that was the problem for mongrel :)

But I still have those pages which are not working... Do you think it's a i18n problem like Eric says? What should I If so?

RE: Some pages don't work - Added by Felix Schäfer over 8 years ago

It is, trust Eric. You could either apply the fix from the ticket, or uninstall i18n 0.4.2 (every other version currently works).

RE: Some pages don't work - Added by David Gueye over 8 years ago

I tried to apply the fix but it did not work.

There are 2 files to fix :

- https://github.com/svenfuchs/i18n/commit/20bf4fd51e6d2efb7a9082358881f626a283c763
- https://github.com/thegcat/redmine/commit/00ef3004120035095c9cd11aba65ebd648160fe6

Is it correct?

I removed the gem i18n too, but it's stil the same. I tried to install another version by doing this :
gem install --version '> 0.3.7' i18n

But it don't work, I still have the 0.4.2 version

Sorry I'm really bad I know, but I am just discovering ruby and all the stuff :)

Thanks for help

RE: Some pages don't work - Added by Felix Schäfer over 8 years ago

That was an either or :-) Just uninstall the 0.4.2 gem: gem uninstall i18n -v=0.4.2. It is said manpages can also help in such cases ;-)

RE: Some pages don't work - Added by David Gueye over 8 years ago

Hello,

I just removed the gem like yous said and restart mongrel cluster and...it works !!

Thank you so much Felix and Eric for your help :)

(1-10/10)