Error #374
NoMethodError in MilestonesController#show
100%
Description
I have redmine 1.0.3 and plugin roadmap 0.2.
I go in Roadmamp, its'OK. Nut when i clic on a milestone (on the right screen I have a error
NoMethodError in MilestonesController#show
undefined method `count' for {5=>5}:Hash
RAILS_ROOT: D:/RoR/rails_apps/redmine-1.0.3
could you help me please ?
Updated by wildwolf zy almost 14 years ago
I get the same problem? someone help me!
NoMethodError (undefined method `count' for {57=>57}:Hash):
vendor/plugins/advanced_roadmap/app/controllers/milestones_controller.rb:22:in `show'
Updated by Emilio González Montaña almost 14 years ago
- Target version set to Advanced roadmap 0.2.1
Updated by Emilio González Montaña almost 14 years ago
- Tracker changed from Feature to Error
- Category set to Milestones
- Status changed from New to In progress
- Assignee set to Emilio González Montaña
- Priority changed from Urgent to Normal
- Start date changed from 2010-12-10 to 2011-01-16
Updated by Emilio González Montaña almost 14 years ago
- Due date set to 2011-01-16
- Status changed from In progress to Resolved
- % Done changed from 0 to 100
Really strange case... Hash
class doesn't have count
method, I've replaced by length
method.
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 Hash
class isn't complaning at all when I call the count
method over a Hash
object, I've checked the Hash
API documentation and the count
method isn't present, but it works! (almost in any installation).
Updated by wildwolf zy almost 14 years ago
hello,
I sloved this problem from http://www.ruby-forum.com/topic/162578.
you can change the 'count' into 'size',restart your redmine,and the plugin working fine.
'vendor\plugins\advanced_roadmap\app\controllers\milestones_controller.rb'
--- @more_than_one_project = (projects.count > 1)
+++ @more_than_one_project = (projects.size > 1)
Good luck!