Try editing or adding a new user: Internal Server Error
Added by Jon Bird over 9 years ago
Hello,
I installed Redmine on a local ubuntu machine. So far it looks good until I tried to add a new user. I get an internal server error. The production.log says:
Started GET "/redmine/users/new" for 192.168.178.46 at 2015-05-09 23:06:26 +0200 Processing by UsersController#new as HTML Current user: admin (id=1) Rendered users/_mail_notifications.html.erb (29.8ms) Rendered users/_preferences.html.erb (15.2ms) Rendered users/_form.html.erb (115.4ms) Rendered users/new.html.erb within layouts/admin (123.7ms) Completed 500 Internal Server Error in 157ms ActionView::Template::Error (bignum too big to convert into `long'): 1: <%= labelled_fields_for :pref, @user.pref do |pref_fields| %> 2: <p><%= pref_fields.check_box :hide_mail %></p> 3: <p><%= pref_fields.time_zone_select :time_zone, nil, :include_blank => true %></p> 4: <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p> 5: <p><%= pref_fields.check_box :warn_on_leaving_unsaved %></p> 6: <% end %> lib/redmine/views/labelled_form_builder.rb:42:in `time_zone_select' app/views/users/_preferences.html.erb:3:in `block in _app_views_users__preferences_html_erb___918378323_35061348' app/helpers/application_helper.rb:1051:in `labelled_fields_for' app/views/users/_preferences.html.erb:1:in `_app_views_users__preferences_html_erb___918378323_35061348' app/views/users/_form.html.erb:50:in `_app_views_users__form_html_erb___620011611_37974600' app/views/users/new.html.erb:4:in `block in _app_views_users_new_html_erb___215261798_32296752' app/helpers/application_helper.rb:1044:in `labelled_form_for' app/views/users/new.html.erb:3:in `_app_views_users_new_html_erb___215261798_32296752'
My environment
Environment:
Redmine version 2.5.2.devel
Ruby version 2.1.2-p95 (2014-05-08) [arm-linux-gnueabihf]
Rails version 4.1.8
Environment production
Database adapter SQLite
SCM:
Git 2.1.4
Filesystem
Redmine plugins:
no plugin installed
Anyone ideas to fix the error? Or other hints? It would save my day.
Thanks Jon.
Replies (3)
RE: Try editing or adding a new user: Internal Server Error - Added by Toshi MARUYAMA over 9 years ago
Jon Bird wrote:
Environment:
Redmine version 2.5.2.devel
Ruby version 2.1.2-p95 (2014-05-08) [arm-linux-gnueabihf]
Rails version 4.1.8
Strange.
Environment production
Database adapter SQLite
RE: Try editing or adding a new user: Internal Server Error - Added by daniele strollo over 9 years ago
1 - Did you try to execute from shell (in the plugin dir /usr/share/redmine/plugins )?
bundle install
2 - Otherwise if you can give up the timezone settings... edit the file
/usr/share/redmine/lib/redmine/views/labelled_form_builder.rb
def time_zone_select(field, priority_zones = nil, options = {}, html_options = {}) # COMMENT THE FOLLOWING LINE # label_for_field(field, options) + super(field, priority_zones, options, html_options.except(:label)).html_safe end
and restart apache.
Hope it will solve.
RE: Try editing or adding a new user: Internal Server Error - Added by Jon Bird over 9 years ago
Thanks.
The second hint worked. I commented the line in /usr/share/redmine/lib/redmine/views/labelled_form_builder.rb and everything runs fine.
Jon