https://redmine.ociotec.com/https://redmine.ociotec.com/favicon.ico?15768443862011-01-06T08:02:13ZRedmine OCIO y TECnologíaAdvanced roadmap - Error #374: NoMethodError in MilestonesController#showhttps://redmine.ociotec.com/issues/374?journal_id=6142011-01-06T08:02:13Zwildwolf zyzywildwolf@163.com
<ul></ul><p>I get the same problem? someone help me!<br />NoMethodError (undefined method `count' for {57=>57}:Hash):<br /> vendor/plugins/advanced_roadmap/app/controllers/milestones_controller.rb:22:in `show'</p> Advanced roadmap - Error #374: NoMethodError in MilestonesController#showhttps://redmine.ociotec.com/issues/374?journal_id=6152011-01-16T22:08:26ZEmilio González Montaña
<ul><li><strong>Target version</strong> set to <i>Advanced roadmap 0.2.1</i></li></ul> Advanced roadmap - Error #374: NoMethodError in MilestonesController#showhttps://redmine.ociotec.com/issues/374?journal_id=6192011-01-16T22:18:02ZEmilio González Montaña
<ul><li><strong>Tracker</strong> changed from <i>Feature</i> to <i>Error</i></li><li><strong>Category</strong> set to <i>Milestones</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>In progress</i></li><li><strong>Assignee</strong> set to <i>Emilio González Montaña</i></li><li><strong>Priority</strong> changed from <i>Urgent</i> to <i>Normal</i></li><li><strong>Start date</strong> changed from <i>2010-12-10</i> to <i>2011-01-16</i></li></ul> Advanced roadmap - Error #374: NoMethodError in MilestonesController#showhttps://redmine.ociotec.com/issues/374?journal_id=6202011-01-16T22:29:39ZEmilio González Montaña
<ul><li><strong>Due date</strong> set to <i>2011-01-16</i></li><li><strong>Status</strong> changed from <i>In progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Really strange case... <code>Hash</code> class doesn't have <code>count</code> method, I've replaced by <code>length</code> method.</p>
<p>The strange thing is that only you two are having this error, by a strange reason (I don't know it) in other Rails installations it seems that <code>Hash</code> class isn't complaning at all when I call the <code>count</code> method over a <code>Hash</code> object, I've checked the <code>Hash</code> API documentation and the <code>count</code> method isn't present, but it works! (almost in any installation).</p> Advanced roadmap - Error #374: NoMethodError in MilestonesController#showhttps://redmine.ociotec.com/issues/374?journal_id=6242011-01-17T04:24:24Zwildwolf zyzywildwolf@163.com
<ul></ul><p>hello,<br /> I sloved this problem from <a class="external" href="http://www.ruby-forum.com/topic/162578">http://www.ruby-forum.com/topic/162578</a>.<br />you can change the 'count' into 'size',restart your redmine,and the plugin working fine.</p>
<p>'vendor\plugins\advanced_roadmap\app\controllers\milestones_controller.rb'<br />--- @more_than_one_project = (projects.count > 1)<br />+++ @more_than_one_project = (projects.size > 1)</p>
<p>Good luck!</p>