Actions
Defect #36584
closedError on creating custom fields using Ruby version 2.7.2
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Ruby support
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Duplicate
Affected version:
Description
Original taken from here: https://www.redmine.org/boards/2/topics/66795?r=66803#message-66803
This ticket was created because of a request for help from the forum. I created it because Rub Version 2.7.2 was released in the User Guide... RedmineInstall
From: Maickel Neitzke
After logging in, I created a custom field and I can't edit it anymore.
Depending on the type of field created, different parts also fail redmine related to that type. When you exclude the field, everything goes back to normal.
Environment: Redmine version 4.2.3.stable Ruby version 2.7.2-p137 (2020-10-01) [arm64-darwin21] Rails version 5.2.6 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Git 2.32.0 Filesystem Redmine plugins: no plugin installed
Error Log:
Started GET "/custom_fields/3/edit" for 127.0.0.1 at 2022-02-06 23:02:12 -0300 Processing by CustomFieldsController#edit as HTML Parameters: {"id"=>"3"} Current user: admin (id=1) Rendering custom_fields/edit.html.erb within layouts/admin Rendered custom_fields/formats/_regexp.html.erb (1.2ms) Rendered custom_fields/formats/_string.html.erb (3.7ms) Rendered custom_fields/_form.html.erb (7.1ms) Rendered custom_fields/edit.html.erb within layouts/admin (7.9ms) Completed 500 Internal Server Error in 17ms (ActiveRecord: 5.1ms) ActionView::Template::Error (Tried to load unspecified class: ActiveSupport::HashWithIndifferentAccess): 1: <%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %> 2: <p><%= f.check_box :text_formatting, {:label => :setting_text_formatting, :data => {:disables => '#custom_field_url_pattern'}}, 'full', '' %></p> 3: <p><%= f.text_field(:default_value) %></p> 4: <p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p> lib/redmine/views/labelled_form_builder.rb:36:in `check_box' app/views/custom_fields/formats/_string.html.erb:2:in `_app_views_custom_fields_formats__string_html_erb___1692955113378240172_104420' app/helpers/custom_fields_helper.rb:66:in `render_custom_field_format_partial' app/views/custom_fields/_form.html.erb:19:in `_app_views_custom_fields__form_html_erb___1323675755188144023_104400' app/views/custom_fields/edit.html.erb:4:in `block in _app_views_custom_fields_edit_html_erb__3236379970482473425_104380' app/helpers/application_helper.rb:1459:in `labelled_form_for' app/views/custom_fields/edit.html.erb:3:in `_app_views_custom_fields_edit_html_erb__3236379970482473425_104380' lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Problem solved.
I installed the 2.6.9 Ruby version and the issue not happened anymore.
Environment: Redmine version 4.2.3.stable Ruby version 2.6.9-p207 (2021-11-24) [arm64-darwin21] Rails version 5.2.6 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Git 2.32.0 Filesystem Redmine plugins: no plugin installed
Related issues
Actions