Change the user model user.rb inside the groups plugin to has_many :groups_as_owner, :source => :group, :through => :group_memberships, :conditions => ["owner = ?", true], :dependent => :destroy
And install any aditional gems that are in the test helper with sudo gem <therename> after this you should have solid setup, untill i found another problem ;) On Feb 4, 9:12 am, rubybox <[email protected]> wrote: > In the groups install template changing > > config.gem "formtastic", :source => 'http://gems.gemcutter.com' > to > gem "formtastic", :source => 'http://gems.gemcutter.com' > seems to fix above issue > at least for installing it > > On Feb 4, 9:05 am, rubybox <[email protected]> wrote: > > > > > Groups plugin with edge version gives: > > > From git://github.com/bborn/community_engine_groups > > * branch HEAD -> FETCH_HEAD > > macpro:portal pascal$ rake rails:template LOCATION=vendor/plugins/ > > community_engine_groups/install_template.rb > > (in /Users/pascal/Desktop/Actus/apache2/rubydocs/portal) > > applying template: vendor/plugins/community_engine_groups/ > > install_template.rb > > route map.routes_from_plugin :community_engine_groups > > executing script/generate plugin_migration from /Users/pascal/ > > Desktop/Actus/apache2/rubydocs/portal > > plugin resource_controller > > 'vendor/plugins/resource_controller' already exists in the index > > rake aborted! > > undefined local variable or method `config' for > > #<Rails::TemplateRunner:0x101fa4ab8> > > > (See full trace by running task with --trace) > > > Can we install this extension or is it not compatible yet? > > I tried several times without luck, im not 'rubylicious' enough yet to > > fix those thing, will come in time :) > > > On Feb 4, 2:56 am, Bruno Bornsztein <[email protected]> > > wrote: > > > > Thanks, I've updated the repository. > > > > 2010/1/31 韩铮 <[email protected]> > > > > > Hi all, > > > > Found a missing required gem for getting CE groups running. > > > > Without this line in environment.rb file, new action won't work. > > > > > config.gem 'justinfrench-formtastic', :lib =>'formtastic', :source > > > > =>' > > > >http://gems.github.com' > > > > > hope this helps. > > > > > BR > > > > > Han > > > > 在 2010年1月29日 下午5:20,rubybox <[email protected]>写道: > > > > > Also very interested in Groups module, > > > >> Although it needs to get more mayor anyone activly working on it? > > > > >> On Jan 29, 5:16 am, 韩铮 <[email protected]> wrote: > > > >> > 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 tohttp://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 tohttp://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%2Bunsubscribe@ > > > >> > >>>>>>> googlegroups.com> > > > >> <communityengine%2Bunsubscribe@ googlegroups.com> > > > >> > >>>>>>> . > > > >> > >>>>>>> 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%2Bunsubscribe@ > > > >> > >>>>> googlegroups.com> > > > >> <communityengine%2Bunsubscribe@ googlegroups.com> > > > >> > >>>>> . > > > >> > >>>>> 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 > > ... > > read more >> -- 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.
