Hi Levi: Celebrate! Everything's ok now. Before when I visit /groups uri it routes me to the UserController. That's the reason why I was redirected(no user "groups" exsists). I solved this by declaring mapping for community_engine_groups before community_engine in routes.rb of my app. So the routes.rb now looks like:
map.routes_from_plugin :community_engine_groups map.routes_from_plugin :community_engine Now I can play with groups... Thanks a lot! BR Han 2010/1/29 Levi Rosol <[email protected]> > It looks like the user you are logged in as isn't an admin. > > It has been a while since i've used the codebase you are on, but if i > remember correctly, the group stuff requires admin. > > We no longer use that code base in out project due to the significant > number of changes that we have needed to make for our site. It would be > awesome if any changes that you do make were to get committed back to > github. Fork the code and submit a pull request to Bruno when you're done. > > -- > Levi Rosol > Twitter: @LeviRosol > > > > > On Thu, Jan 28, 2010 at 7:59 PM, 韩铮 <[email protected]> wrote: > >> Hi Levi, >> I have tried ce groups with rails 2.3.2. I logged in as admin. Everytime >> I hit the "Groups" tab, It redirect me to the user's "My Profile" tab. the >> log shows: >> >> Processing UsersController#show (for 127.0.0.1 at 2010-01-29 09:51:46) >> [GET] >> Parameters: {"id"=>"groups"} >> [I18n] loading locale: en from config >> [I18n] Locale set to en >> [4;36;1mUser Columns (0.0ms) [0m [0;1mSHOW FIELDS FROM `users` [0m >> [4;35;1mUser Load (0.0ms) [0m [0mSELECT * FROM `users` WHERE >> (`users`.`login_slug` IN ('groups')) AND (users.activated_at IS NOT NULL) >> LIMIT 1 [0m >> Redirected to http://localhost:3000/login >> Filter chain halted as [:find_user] rendered_or_redirected. >> Completed in 94ms (DB: 0) | 302 Found [http://localhost/groups] >> host/groups] >> [4;36;1mSQL (0.0ms) [0m [0;1mSET NAMES 'utf8' [0m >> [4;35;1mSQL (0.0ms) [0m [0mSET SQL_AUTO_IS_NULL=0 [0m >> >> Processing SessionsController#new (for 127.0.0.1 at 2010-01-29 09:57:54) >> [GET] >> [I18n] loading locale: en from config >> [I18n] Locale set to en >> [4;35;1mUser Columns (0.0ms) [0m [0mSHOW FIELDS FROM `users` [0m >> [4;36;1mUser Load (0.0ms) [0m [0;1mSELECT * FROM `users` WHERE >> (`users`.`id` = 1) LIMIT 1 [0m >> Redirected to http://localhost:3000/administrator >> Completed in 31ms (DB: 0) | 302 Found [http://localhost/login] >> ost/login] >> [4;35;1mSQL (0.0ms) [0m [0mSET NAMES 'utf8' [0m >> [4;36;1mSQL (0.0ms) [0m [0;1mSET SQL_AUTO_IS_NULL=0 [0m >> >> what I'm missing? >> >> BR >> >> Han >> >> >> 2010/1/28 韩铮 <[email protected]> >> >>> well maybe I'm running a wrong version of rails. >>> I tried to make ce groups run on rails 2.3.5, before I comment that >>> line,I recieve an error as I pasted in my prior posts. >>> I guess it's something about the "has_many :through" mechanism.It >>> behaves differently on 2.3.4 and 2.3.5. >>> >>> ..sorry for poor english (*^__^*) . >>> >>> BR >>> Han >>> 2010/1/28 Levi Rosol <[email protected]> >>> >>> I noticed that you're running rails 2.3.5. Assuming you're running CE >>>> edge, you should be on 2.3.4. If you're running master then you should be >>>> on >>>> rails 2.3.2. >>>> >>>> What was the reason for commenting out that line? Without it, many >>>> things within the groups plugin will break. >>>> >>>> -- >>>> Levi Rosol >>>> Twitter: @LeviRosol >>>> >>>> >>>> >>>> On Thu, Jan 28, 2010 at 3:22 AM, 韩铮 <[email protected]> wrote: >>>> >>>>> Hi again... >>>>> I commented line 5 of >>>>> vendor/plugins/community_engine_groups/app/models/user.rb. >>>>> My app work well again. I can see a new tab named "Groups",but when I >>>>> click that, it redirect me to my profile page, and shows a tip "please >>>>> login". I saw the logs and find something like "session.new". so I guess >>>>> there's something wrong with the session. >>>>> I'm new to CE groups. So please help. >>>>> >>>>> BR >>>>> >>>>> Han >>>>> >>>>> 2010/1/28 韩铮 <[email protected]> >>>>> >>>>>> hi all, >>>>>> >>>>>> I have community_engine_groups installed with my app. >>>>>> However, I ran in this when I visit the index of my app: >>>>>> >>>>>> NoMethodError (undefined method `class_name' for nil:NilClass): >>>>>> (eval):3:in `has_many' >>>>>> vendor/plugins/community_engine_groups/app/models/user.rb:5 >>>>>> desert (0.5.3) lib/desert/rails/dependencies.rb:67:in >>>>>> `define_constant_from_file' >>>>>> >>>>>> checked the file " >>>>>> vendor/plugins/community_engine_groups/app/models/user.rb" on line >>>>>> 5,it reads this: >>>>>> >>>>>> has_many :groups_as_owner, :through => :group_memberships, :conditions >>>>>> => ["owner = ?", true], :dependent => :destroy >>>>>> what can I do to fix this? I'm using rails 2.3.5 with ruby 1.8.7. >>>>>> database migrate is ok. >>>>>> >>>>>> thx in advance >>>>>> >>>>>> Han >>>>>> >>>>>> 2010/1/23 Michael Hollins <[email protected]> >>>>>> >>>>>> >>>>>>> On 23/01/2010, at 8:47 AM, Levi Rosol wrote: >>>>>>> >>>>>>> > I saw your email but forgot to reply :) >>>>>>> >>>>>>> No problems. Thanks Levi. I will take a look. >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "CommunityEngine" group. >>>>>>> To post to this group, send email to >>>>>>> [email protected]. >>>>>>> To unsubscribe from this group, send email to >>>>>>> [email protected]<communityengine%[email protected]> >>>>>>> . >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/communityengine?hl=en. >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> It's 10% luck 20% skill >>>>>> 15% concentrated power of will >>>>>> 5% pleasure 50% pain >>>>>> And a 100% reason to remember the name >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> It's 10% luck 20% skill >>>>> 15% concentrated power of will >>>>> 5% pleasure 50% pain >>>>> And a 100% reason to remember the name >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "CommunityEngine" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]<communityengine%[email protected]> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/communityengine?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "CommunityEngine" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<communityengine%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/communityengine?hl=en. >>>> >>> >>> >>> >>> -- >>> It's 10% luck 20% skill >>> 15% concentrated power of will >>> 5% pleasure 50% pain >>> And a 100% reason to remember the name >>> >> >> >> >> -- >> It's 10% luck 20% skill >> 15% concentrated power of will >> 5% pleasure 50% pain >> And a 100% reason to remember the name >> >> -- >> You received this message because you are subscribed to the Google Groups >> "CommunityEngine" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<communityengine%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/communityengine?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "CommunityEngine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<communityengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/communityengine?hl=en. > -- It's 10% luck 20% skill 15% concentrated power of will 5% pleasure 50% pain And a 100% reason to remember the name -- You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/communityengine?hl=en.
