alexmonteiro / Redmine-Monitoring-Controlling

Redmine Plugin that works with Highcharts to show tasks on project throught Charts.
Other
131 stars 79 forks source link

500 internal error #52

Closed ghost closed 11 years ago

ghost commented 12 years ago

i have 500 internal error. Here is the redmine log:

Processing HomeMonitoringControllingProjectController#index (for 192.168.104.105 at 2012-07-22 15:42:06) [GET]
  Parameters: {"action"=>"index", "id"=>"hd-it", "controller"=>"home_monitoring_controlling_project"}
Rendering template within layouts/base
Rendering home_monitoring_controlling_project/index

ActionView::TemplateError (undefined method `html_safe' for #<String:0x6229344>) on line #42 of vendor/plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:
39:             },
40:             series: [{
41:                 type: 'pie',
42:                 data: <%=@statuses.map{ |situacao| [situacao.name.to_s, situacao.totalissues.to_i]}.inspect.html_safe%>
43:             }]
44:         });
45:     });

    vendor/plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:42
    vendor/plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/index.html.erb:3

Rendering c:/redmine/public/500.html (500 Internal Server Error)

please help. Thanks

alexmonteiro commented 12 years ago

HI @harisx, What is your environment settings, ruby, rails and redmine versions?

ghost commented 12 years ago

i am using redmine v1.1.2 running in ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] and Rails 2.3.5

alexmonteiro commented 12 years ago

The plugin was developed to works with redmine 1.4.x or 2.x, and ruby 1.8.7. The old versions of ruby and redmine does not suport functions such as .html_safe. Try to update your redmine at least to 1.4.x and ruby to 1.8.7.

fundenys commented 12 years ago

Hi, i have a 500 internal error but with other log. ActionView::Template::Error (undefined method name' for nil:NilClass): 16: plotShadow: false 17: }, 18: title: { 19: text: '<%=@project.name%>' 20: }, 21: tooltip: { 22: formatter: function() { plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:19:in_plugins_redmine_monitoring_controlling_app_views_home_monitoring_controlling_projectindex_html_erb979422897_99776136' when i try to skip this error in deleting this line, i have a new problem: ActionView::Template::Error (undefined method identifier' for nil:NilClass): 89: events: { 90: // Default action for (left) clicking the data 91: click: function(point) { 92: window.open('/projects/<%=@project.identifier%>/issues?set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=%3D&v%5Bstatus_id%5D%5B%5D=<%=cat.id%>&f%5B%5D=&c%5B%5D=status&c%5B%5D=priority&c%5B%5D=subject&c%5B%5D=author&c%5B%5D=assigned_to&c%5B%5D=start_date&c%5B%5D=due_date&c%5B%5D=spent_hours&c%5B%5D=done_ratio&group_by='); 93: } 94: }, 95: dataLabels: { plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:92:in_plugins_redmine_monitoring_controlling_app_views_home_monitoring_controlling_projectindex_html_erb___271516738_100770804' plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:84:in each' plugins/redmine_monitoring_controlling/app/views/home_monitoring_controlling_project/_index.html.erb:84:in_plugins_redmine_monitoring_controlling_app_views_home_monitoring_controlling_projectindex_html_erb___271516738_100770804'

My environment: redmine 2.0.3 stable ruby 1.8.7 (i386-mingw32) rails 3.2.6

redmine_monitoring_controlling 0.1.1

i have folowwing the installation guide. Thanks

fundenys commented 12 years ago

i have changed @project=project.find_by_identifiant to @project=projet.find and its ok. I have another pb with clic on a issue, i will open a new issue when i come back from holidays. a+

sorry for my english(i m french)

alexmonteiro commented 12 years ago

Could you upgrade your redmine to 1.4.x stable and ruby to 1.8.7? The plugin only works from this versions above.

fmarines commented 12 years ago

Hello everyone i'm rookie with this ruby stuff, and did some workarounds in my installation (redmine v1.1.2 running in ruby 1.8.7 2010-01-10 patchlevel 249 [i686-linux] ) works really good !!!...

@harisx maybe work for you:

1.- modify there reference to the html_safe funtion in the erb files from the plugin e.g: .inspect.html_safe%> TO .inspect%>

2.- delete the reference

<%= notice %>

from the index.html.erb files e.g: mc_human_resource_mgmt_project/index.html.erb

3.- migrate plugins

4.- restart redmime

5.- analyze your data! great plug!